#agc027d. [agc027_d]Modulo Matrix
[agc027_d]Modulo Matrix
Problem Statement
You are given an integer .
Construct any one -by- matrix that satisfies the conditions below. It can be proved that a solution always exists under the constraints of this problem.
- are pairwise distinct integers.
- There exists a positive integer such that the following holds: Let and be two elements of the matrix that are vertically or horizontally adjacent. Then, is always .
Constraints
Input
Input is given from Standard Input in the following format:
Output
Print your solution in the following format:
Sample Input 1
2
Sample Output 1
4 7
23 10
- For any two elements and that are vertically or horizontally adjacent, is always .