e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
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 (-50x1, 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.

Time limit 1 second
Memory limit 128 MiB
Input example #1
1 1 -1 1
Output example #1
1
2