Find the distance between the points A(x1, y1) and B(x2, y2), when
(i)AB is parallel to the x-axis
(ii) AB is parallel to the y-axis.