Problems
Segment in a coordinate system
Segment in a coordinate system
Given segment with coordinates x1
, y1
, x2
, y2
. In which coordinate quarters the segment is located?
Input
One line contains four integers x1
, y1
, x2
, y2
(-50 ≤ x1
, y1
, x2
, `y[2] ≤ 50).
Output
Print in ascending order the quarters with segment. Print each number in a new line, or 0 if segment lies on the axis.
Input example #1
1 1 -1 1
Output example #1
1 2