SP4201 RATING - Coder Ratings
Description
Some of the more elite (and not-so-elite) coders around take part in a certain unnamed programming contest. In said contest, there are multiple types of competitions. Here, we consider the Open and High School competition types. For each type, each competitor receives a _rating_, an integer between 1 and 100000, inclusive. A coder's rating is based upon his or her level of performance in matches and is calculated using a complicated formula which, thankfully, you will not be asked to implement.
Although the Open and High School ratings for a coder who has participated in both competition types lately are usually close, this is not always the case. In particular, High School matches are more about speed, since many coders are able to solve all the problems, whereas Open matches require more thinking and there is a steeper curve in terms of problem difficulty.
**Problem Statement**
You are given _N_ coders (1 N N. Each of these coders participates in both High School and Open matches. For each coder, you are also given an Open rating _A $ _{i} $_ and a High School rating _H $ _{i} $_ . Coder _i_ is said to be _better_ than coder _j_ if and only if both of coder _i_'s ratings are greater than or equal to coder _j_'s corresponding ratings, with at least one being greater. For each coder _i_, determine how many coders coder _i_ is better than.
**Input Format**
On the first line of input is a single integer _N_, as described above.
_N_ lines then follow. Line _i_+1 contains two space-separated integers, _A $ _{i} $_ and _H $ _{i} $_ .
**Output Format**
Line _i_ should contain the number of coders that coder _i_ is better than.
**Sample Input**
```
8
1798 1832
862 700
1075 1089
1568 1557
2575 1984
1033 950
1656 1649
1014 1473
```
**Sample Output**
```
6
0
2
4
7
1
5
1
```
Input Format
N/A
Output Format
N/A