There is a square of size $n$, divided into $n \times n$ cells like a checkerboard. Each cell contains a single integer.
Two positions $(x_1, y_1)$ and $(x_2, y_2)$ are independent if they lie in different rows and different columns, that is, $x_1 \neq x_2$ and $y_1 \neq y_2$. A set of $n$ positions is independent if every pair of them is independent. The number of ways to choose $n$ mutually independent positions is exactly $n!$ (equivalently, pick exactly one cell from each row and one from each column).
The square is called homogeneous if, no matter which $n$ independent positions you choose, the sum of the numbers in those cells is always the same.
Given the numbers written in the square, write a program that decides whether the square is homogeneous.
The input consists of several test cases. The first line of each test case contains the size $n$ of the square ($1 \le n \le 1000$). The next $n$ lines each contain $n$ integers separated by spaces. Each number is between $-1000000$ and $1000000$ inclusive. The last line of the input contains a single $0$, which is not processed.
For each test case, print homogeneous if the square is homogeneous, and not homogeneous otherwise, each on its own line.