Programming Contest II
Every year, Hakuto University holds a programming contest. The contest starts with all team scores at 0, and points are added based on the answers. In this contest, teams are ranked in order of their scores. Teams are assigned numbers from 1 to N, the total number of teams. In case of a tie, the team with the smaller number is ranked higher.
To make the contest more exciting, Hakuto University is developing a ranking system for spectators. As a member of the development team, you are responsible for creating a program that updates the scores and reports the team number and score for the specified rank according to the given commands.
Input
The input is given in the following format:
N C
command1
command2
:
commandC
The first line contains the number of teams N (2 ≤ N ≤ 100000) and the number of commands C (1 ≤ C ≤ 100000). The following C lines give the commands, one per line. Each command is given in the following format:
0 t p
or
1 m
The first digit indicates whether the command is an update command (0) or a report command (1). In an update command, the team specified by the number t (1 ≤ t ≤ N) is given an integer score p (1 ≤ p ≤ 109) to add to its current score. In a report command, the team number and score for the specified rank m (1 ≤ m ≤ N) are reported. It is guaranteed that at least one report command will appear.
Output
For each report command, output the team number and score for the specified rank on a single line separated by a space. 
Sample Input 1
3 11
0 2 5
0 1 5
0 3 4
1 1
1 2
1 3
0 3 2
1 1
0 2 1
1 2
1 3 
Sample Output 1
1 5
2 5
3 4
3 6
3 6
1 5
Sample Input 2
5 2
1 1
1 2
Sample Output 2
1 0
2 0
