Manhattan Rectangle

hard
https://www.codechef.com/FEB19B/problems/MANRECT

Input Format

check the link

Output Format

check the link

Constraints

check the link

Notice

check the link

Example

Input
1
Output
1
Previous
Lost Tree
Next
Bear And Prime 100

Related Questions