atcoder#AGC027D. [AGC027D] Modulo Matrix
[AGC027D] Modulo Matrix
Score : points
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:
2
4 7
23 10
- For any two elements and that are vertically or horizontally adjacent, is always .