Problems
Point and a rectangle
Point and a rectangle
Determine whether the point (x, y) belongs to a rectangle with the ends of the diagonal (x1
, y1
), (x2
, y2
) and the sides parallel to coordinate axes.
Input
Six real numbers x, y, x1
, y1
, x2
, y2
- the coordinates of the point and the coordinates of diagonal ends of rectangle respectively. The numbers do not exceed 100 by absolute value.
Output
Print 1 if the point belongs to a rectangle (including the border), and 0 otherwise.
Input example #1
1 2 3 4 0 0
Output example #1
1