38 parrots
Everyone is familiar with the tale of how the forest dwellers measured the length of the Boa using parrots. Now, they want to attempt this again. This time, they aim to use the largest parrots possible to minimize the number needed. They'll handle the measuring themselves, but selecting the largest parrot from a group is quite a task, so they need your help.
Your task is to determine the length of the largest parrot within a specified segment (since not all parrots are eager to participate in this fun activity) and to count how many parrots have this maximum length, so they can choose from them.
Input
The first line contains the number N (1 ≤ N ≤ 10^9) — the total number of parrots. Initially, each parrot has a length of ten centimeters. The second line contains the number M (1 ≤ M ≤ 10^5) — the number of queries. Each query consists of three numbers: x, l, r. If x is one, you need to output two numbers on a separate line: the maximum length of parrots in the segment [l; r] and the count of parrots with this maximum length in the same segment. It is guaranteed that this segment is a sub-segment of the initial one. If x is two, the length of the parrot at position l has changed and is now equal to r. It is guaranteed that the parrot at position l exists, and the number r will never exceed 2·10^9.
Output
For each query where x is one, output two numbers — the response to the query.