eolymp
bolt
Try our new interface for solving problems
Məsələlər

Quadrants

Quadrants

Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB

Given the coordinates (x, y) of some points in 2-dimensional plane, find out which quadrant (Q1-Q4) the points belong to. Some points belong to AXIS if they are located on X-axis or Y-axis.

Giriş verilənləri

The first line contains an integer n (1n1000) which determines the number of points. The following n lines contain two integers which correspond to the coordinates (x_i, y_i) of each point (-10^6x_i, y_i10^6).

Çıxış verilənləri

Print out the total number of points in each quadrant and the axis in the same format as the sample output below.

Nümunə

Giriş verilənləri #1
5
0 0
0 1
1 1
3 -3
2 2
Çıxış verilənləri #1
Q1: 2
Q2: 0
Q3: 0
Q4: 1
AXIS: 2
Mənbə ACM-ICPC Asia Phuket Regional Programming Contest 2013, Practice Session, 21 November 2013