Cafeteria
During this shift, there are so many LKSHe-nya that they can't all fit in the dining hall at once, so they come and go at random times. The deputy head has recorded the arrival and departure times for each LKSHe-nya and wants to determine how many other LKSHe-nya each one encounters in the dining hall.
Input
The first line contains the number of LKSHe-nya, N (1 ≤ N ≤ 10^5). Each of the following N lines contains two integers, S_i and T_i (0 ≤ S_i ≤ T_i ≤ 10^9), separated by a space. These represent the arrival and departure times of the i-th LKSHe-nya.
Output
The program should output N integers. The i-th integer should indicate the number of other LKSHe-nya that the i-th LKSHe-nya meets in the dining hall. If one LKSHe-nya arrives at the same moment another leaves, they are considered to have met.