#1264
Unrated
Prosječni
스페셜 저지채점 준비중
시간 제한
1s
메모리 제한
64MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Slavko is bored, so he’s filling out an N × N table with positive integers. He’s particularly happy if he manages to fill out the table so that the following conditions are met: ● The average of the numbers in each row is an integer that is located in the same row. ● The average of the numbers in each column is an integer that is located in the same column. ● All numbers in the table are different. Help Slavko find a table that will make him happy.

입력

The first line of input contains the integer N (1 ≤ N ≤ 100).

출력

Output N lines, in each line output N integers separated by space. Let the j-th number in the i-th line correspond to the value that Slavko will write down in the i-th row and j-th column of the table. All numbers must be greater than 0 and smaller than 1 000 000 000. If there are multiple solutions, output any. If there is no solution, output -1.

예제 입력 1

3

예제 출력 1

1 2 3
4 5 6
7 8 9

예제 입력 2

2

예제 출력 2

-1
코드 제출

이 문제는 현재 제출할 수 없습니다.

이 현상이 잘못되었다고 생각될 경우 관리자한테 문의주세요.

내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.