The main building of Daejeon Daeshin High School has floors, and each floor has classrooms. The floors are numbered through from bottom to top. On each floor, the classrooms are numbered through from left to right.
Initially, the discomfort value of every classroom is . Process the following queries.
1: Construction occurs in classroom on floor . Increase the discomfort value of that classroom and every vertically or horizontally adjacent classroom by . Positions outside the building are ignored.2: Print the number of a classroom with maximum discomfort on floor . If several classrooms have the same maximum discomfort, print the smallest classroom number.
After all queries, select a classroom with maximum discomfort in the entire building. If several classrooms have the same maximum discomfort, choose the one on the lowest floor. If there is still a tie, choose the one with the smallest classroom number.
Print the answers to all type 2 queries and the final selected classroom.
Input
The input is given in the following format.
case case case
Each case is given in the following format.
Each query has one of the following forms.
Output
For every type 2 query in every test case, print the required classroom number on its own line.
After processing all queries of each test case, print the floor number and classroom number of the final selected classroom, separated by a space.
Constraints
- .
- .
- .
- In a type
1query, and . - In a type
2query, . - The sum of over all test cases does not exceed .
- The sum of over all test cases does not exceed .
Subtasks
Samples
After all queries of the first test case, the maximum discomfort is . Both classroom on floor and classroom on floor have this value, so classroom on the lower floor is selected.