ADWFNSNW  A Dwarf  N Snow Whites
English  Tiếng Việt 
Today RomanD3 wants to race his old bicycle to Do Son beach with two friends of his, on his way he thought out a problem named "A Dwarf  N Snow Whites":
On his hard way to Do Son beach, he races with N Snow White racing on N different bicycles, but none of them wants to go alone. Given that the i^{th} Snow White wants to be taken by the dwarf RomanD3 for T_{i} minute(s), then she can go alone for (only) D_{i} minute(s) (she will cry after that); RomanD3 wants to "escape" from them soon to go... by bus with the N+1^{th} Snow White on the bus (whom he likes), so he must take each Snow White exactly one time but not let any of them cry; then he needs at least one minute to go with his lady (in dream ;)) ).
Please help him to determine whether he can do or not.
Input
 The first line contains number N.
 Next N line(s), the i^{th} line contains two numbers T_{i}, D_{i}.
Output
 Print out 1 whether he can not "escape" from them or print out the order of serving them before he can jump on the bus ;))
Example
Input: 2 2 11 11 30 Output: 2 1
Limitations
 n ≤ 10^{5}.
hide comments
Alexander:
20101112 12:50:55
Ti and Di are integers (at least scanf doesn't balk).


Adamax:
20100702 07:20:28
Are Ti and Di integers? 

[Trichromatic] XilinX:
20090611 07:53:50
I don't understand the problem statement. Maybe a further example is needed.


Robert Gerbicz:
20090611 07:53:50
It's a little Chinese for me.

Added by:  AnhDQ 
Date:  20090525 
Time limit:  0.100s1.200s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ERL JSRHINO NODEJS PERL6 VB.NET 
Resource:  AnhDQ  RomanD3 :)) 