eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Quadrants

Quadrants

Given the coordinates \textbf{(x, y)} of some points in \textbf{2}-dimensional plane, find out which quadrant (\textbf{Q1-Q4}) the points belong to. Some points belong to AXIS if they are located on \textbf{X}-axis or \textbf{Y}-axis. \includegraphics{https://static.e-olymp.com/content/ef/eff09728cf8fc39206c9971c2c891674f186724d.jpg} \InputFile The first line contains an integer \textbf{n} (\textbf{1} ≤ \textbf{n} ≤ \textbf{1000}) which determines the number of points. The following \textbf{n} lines contain two integers which correspond to the coordinates (\textbf{x_i}, \textbf{y_i}) of each point (\textbf{-10^6} ≤ \textbf{x_i}, \textbf{y_i} ≤ \textbf{10^6}). \OutputFile Print out the total number of points in each quadrant and the axis in the same format as the sample output below.
Ліміт часу 1 секунда
Ліміт використання пам'яті 64 MiB
Вхідні дані #1
5
0 0
0 1
1 1
3 -3
2 2
Вихідні дані #1
Q1: 2
Q2: 0
Q3: 0
Q4: 1
AXIS: 2
Джерело ACM-ICPC Asia Phuket Regional Programming Contest 2013, Practice Session, 21 November 2013