Let $k$ and $n$ be positive integers and let $x_{1}, x_{2}, \ldots, x_{k}, y_{1}, y_{2}, \ldots, y_{n}$ be distinct integers. A polynomial $P$ with integer coefficients satisfies

$$
P\left(x_{1}\right)=P\left(x_{2}\right)=\ldots=P\left(x_{k}\right)=54
$$

and

$$
P\left(y_{1}\right)=P\left(y_{2}\right)=\ldots=P\left(y_{n}\right)=2013 .
$$

Determine the maximal value of $k n$.
Letting \( Q(x) = P(x) - 54 \), we see that \( Q \) has \( k \) zeroes at \( x_1, \ldots, x_k \), while \( Q(y_i) = 1959 \) for \( i = 1, \ldots, n \). We notice that \( 1959 = 3 \cdot 653 \), and an easy check shows that 653 is a prime number. As

\[
Q(x) = \prod_{j=1}^{k} (x - x_j) S(x)
\]

and \( S(x) \) is a polynomial with integer coefficients, we have

\[
Q(y_i) = \prod_{j=1}^{k} (y_i - x_j) S(x_j) = 1959.
\]

Now all numbers \( a_i = y_i - x_1 \) have to be in the set \( \{ \pm 1, \pm 3, \pm 653, \pm 1959 \} \). Clearly, \( n \) can be at most 4, and if \( n = 4 \), then two of the \( a_i \)'s are \( \pm 1 \), one has absolute value 3 and the fourth one has absolute value 653. Assuming \( a_1 = 1, a_2 = -1 \), \( x_1 \) has to be the average of \( y_1 \) and \( y_2 \). Let \( |y_3 - x_1| = 3 \). If \( k \geq 2 \), then \( x_2 \neq x_1 \), and the set of numbers \( b_i = y_i - x_2 \) has the same properties as the \( a_i \)'s. Then \( x_2 \) is the average of, say \( y_2 \) and \( y_3 \) or \( y_3 \) and \( y_1 \). In either case \( |y_4 - x_2| \neq 653 \). So if \( k \geq 2 \), then \( n \leq 3 \). In a quite similar fashion one shows that \( k \geq 3 \) implies \( n \leq 2 \).
The polynomial \( P(x) = 653 x^2 (x^2 - 4) + 2013 \) shows the \( nk = 6 \) indeed is possible.