AT_past20_f 試験の結果
Description
$ N $ students took a final exam. Each student has a student ID, which is a unique integer between $ 1 $ and $ N $ .
The student with ID $ i $ $ (1\leq i\leq N) $ marked $ E _ i $ points in English and $ M _ i $ points in math.
The students' ranks are determined based on their scores by the following criteria:
- Those with higher total (English and math) scores rank higher.
- Among those with the same total score, those with higher math scores rank higher.
- Among those with the same total score and math score, those with larger IDs rank higher.
Print the student IDs in the order of their ranks.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ E _ 1 $ $ M _ 1 $ $ E _ 2 $ $ M _ 2 $ $ \vdots $ $ E _ N $ $ M _ N $
Output Format
Print all the student IDs, separated by spaces, in order of their ranks, with higher-ranked students coming first.
Explanation/Hint
### Sample Explanation 1
Student $ 1 $ marked the highest total score of $ 150 $ points. Thus, student $ 1 $ ranks highest.
The other students marked the same total score of $ 140 $ points. Among them, student $ 2 $ marked the highest math score of $ 100 $ points. Thus, student $ 2 $ ranks the next.
Student $ 3 $ and $ 4 $ marked the same total and math scores. Among them, those with larger IDs rank higher. Thus, student $ 4 $ ranks the next, and student $ 3 $ ranks lowest.
Hence, `1 2 4 3` should be printed.
### Sample Explanation 2
There may be only one student.
### Constraints
- $ 1\leq N\leq100 $
- $ 0\leq E _ i\leq100\ (1\leq i\leq N) $
- $ 0\leq M _ i\leq100\ (1\leq i\leq N) $
- All input values are integers.