eolymp
bolt
Try our new interface for solving problems
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