IMO 1977 SL 9

For which positive integers n do there exist two polynomials f

IMO 1977 SL 9

Origin: HUN

Problem

For which positive integers n do there exist two polynomials f and g with integer coefficients of n variables x1, x2, . . . , xn such that the following equality is satisfied: n  i=1 xi f(x1, x2, . . . , xn) = g(x2 1, x2 2, . . . , x2 n)?