Apply the Distance and Midpoint Formulas