Midpoint and Distance Formula