A drone pilot reports the drone's position as a point (x, y) on a graph.
Tell where the point lies: • Quadrant 1 (x > 0, y > 0), Quadrant 2 (x < 0, y > 0), Quadrant 3 (x < 0, y < 0), Quadrant 4 (x > 0, y < 0) • Origin if both are 0 • X-axis if only y is 0, Y-axis if only x is 0
Input Format A single line with two integers x and y.
Output Format Print one of: Quadrant 1, Quadrant 2, Quadrant 3, Quadrant 4, Origin, X-axis, Y-axis.
Constraints • -1000 ≤ x, y ≤ 1000
Examples
Example 1
Input
3 4
Output
Quadrant 1
Explanation Both positive, so Quadrant 1.
Example 2
Input
-2 5
Output
Quadrant 2
Explanation x negative and y positive, so Quadrant 2.
Example 3
Input
0 0
Output
Origin
Explanation The drone is at the centre.
Example 4
Input
7 0
Output
X-axis
Explanation y is 0, so the point is on the X-axis.
Acceptance—
Accepted0
Submissions0
Auto-save
SavedLn 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
Quadrant 1
No results yet
Run your code to test it against the sample cases.