Write a program to accept a coordinate point in an XY coordinate system and determine in which quadrant the coordinate point lies.
"1st Quadrant": if +x,+y
"2nd Quadrant": if -x,+y
"3rd Quadrant": if -x,-y
"4th Quadrant": if +x,-y
"x axis": if x,0
"y axis": if 0,y
"Origin": if 0,0
The only line of input contains two integers separated by a single space.
Output format :
The only line of the output prints the Position of the point in the coordinate system.
5 100
1st Quadrant
Both x and y are positive so the point lies in 1st Quadrant.
0 -80
y axis
Since x is 0 the point lies in y-axis.
-2 40
2nd Quadrant
Since x is negative and y is positive the point lies in 2nd Quadrant.
Take input of x and y coordinates in variable x and y respectively.
if ( x > 0 && y > 0) print 1st Quadrant
else if (x < 0 && y > 0) print 2nd quadrant
else if (x < 0 && y < 0) print 3rd quadrant
else if (x > 0 && y < 0) print 4th quadrant
else if (x == 0 && y == 0) print origin
else if ( x == 0 && y ≠ 0) print y-axis
else print x-axis.