Problem

Source: Czech-Polish-Slovak Match Junior 2019, individual p3 CPSJ

Tags: combinatorics, numbers in a table



Determine all positive integers $n$ such that it is possible to fill the $n \times n$ table with numbers $1, 2$ and $-3$ so that the sum of the numbers in each row and each column is $0$.