After lunch at LKSH, students often engage in various activities, but each student makes an effort to visit the computer room to tackle any unresolved problems from their practice sessions.
This year, the weather is exceptionally hot, making the computer room quite stuffy. To prevent overcrowding, it's crucial to monitor the number of students present at any given time. Consequently, the deputy principal has recorded the arrival and departure times of each student in the computer room.
The deputy principal now wishes to determine how many other students each student encountered while in the computer room.
The first line contains the number of students, (1 \leq N \leq 10^5). For each of the following lines, there are two integers, S_i and T_i (0 \leq S_i \leq T_i \leq 10^9), which represent the arrival and departure times of the -th student in the computer room.
The output should consist of integers. The -th integer should indicate the number of students the -th student met in the computer room.
If a student arrives at the same time another student departs, they are considered to have met.
Example 1