have a question in math

(( distance between two points ))

show that C(-5,-1)is the midpoint of the line segment joining A(-2,5) and B(-8,-7)

please in detales .. thank u