P is midpoint of (AB) if P divides (AB) in the ratio:

1:1

2:2

2:1

1:2