[BOJ 9772] Quadrants

View as PDF

Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 128M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

Given the coordinates (x,y) of some points in 2-dimensional plane, find out which quadrant(Q1-Q4) the points are located. If a point is located on X-axis or Y-axis, print out AXIS instead.</p>

입력 형식

Each line contains a pair of real numbers which is the coordinate of a point. Input is terminated by 0 0.

출력 형식

Print out in each line Q1, Q2, Q3, Q4 or AXIS for each point.

예제 입력

1 2
-1 -0.12
4 0
-10.4 200
0 0

예제 출력

Q1
Q3
AXIS
Q2
AXIS

Comments

There are no comments at the moment.