In each cell of an n×nn \times nn×n table, an integer is written. It turns out that for all kkk from 1 to nnn, the sum of the numbers in the kkk-th column is either one less or two more than the sum of the numbers in the kkk-th row. For which nnn is this possible?