An 80 by 80 square is repeatedly split into 3:1 area pieces by alternating vertical and horizontal cuts. The small piece receives labels 1 through 15. For each point (x,y) not on a cut line, report its label.
Input
The first line contains n points (1≤n≤100). Each of the next n lines contains x and y with 0≤x,y≤80.
Output
Print the region label for each point on its own line.