Find all integers $n$ for which the polynomial $p(x) = x^5 -nx -n -2$ can be represented as a product of two non-constant polynomials with integer coefficients.
To find all integers \( n \) for which the polynomial \( p(x) = x^5 - nx - n - 2 \) can be represented as a product of two non-constant polynomials with integer coefficients, we will explore two possibilities.

### Possibility 1:
We write the polynomial \( P(x) \) as:
\[ P(x) = x^5 - nx - n - 2 = (x - a)(x^4 + bx^3 + cx^2 + dx + e) \]

For \( x = a \):
\[ P(a) = a^5 - na - n - 2 = 0 \]
\[ a^5 - na = n + 2 \]
\[ a(a^4 - n) = n + 2 \]

Let \( a^4 - n = e \), then:
\[ a \cdot e = n + 2 \]
\[ \left\{\begin{array}{l} a^4 - n = e \\ a \cdot e = n + 2 \end{array}\right. \Rightarrow \left\{\begin{array}{l} a^4 - e = n \\ a \cdot e = n + 2 \end{array}\right. \]

Subtracting:
\[ a^4 - e - a \cdot e = -2 \]
or
\[ a^4 - a \cdot e = e - 2 \]
and
\[ a(a^3 - e) = e - 2 \]

Let \( a^3 - e = l \), then:
\[ a \cdot l = e - 2 \]
\[ \left\{\begin{array}{l} a^3 - e = l \\ a \cdot l = e - 2 \end{array}\right. \Rightarrow \left\{\begin{array}{l} a^3 - l = e \\ a \cdot l = e - 2 \end{array}\right. \]

Subtracting:
\[ a^3 - l - a \cdot l = 2 \]
or
\[ a^3 - a \cdot l = l + 2 \]
and
\[ a(a^2 - l) = l + 2 \]

Let \( a^2 - l = t \), then:
\[ a \cdot t = l + 2 \]
\[ \left\{\begin{array}{l} a^2 - l = t \\ a \cdot t = l + 2 \end{array}\right. \Rightarrow \left\{\begin{array}{l} a^2 - t = l \\ a \cdot t = l + 2 \end{array}\right. \]

Subtracting:
\[ a^2 - t - a \cdot t = -2 \]
or
\[ a^2 - a \cdot t = t - 2 \]
and
\[ a(a - t) = t - 2 \]

Let \( a - t = z \), then:
\[ a \cdot z = t - 2 \]
\[ \left\{\begin{array}{l} a - t = z \\ a \cdot z = t - 2 \end{array}\right. \Rightarrow \left\{\begin{array}{l} a - z = t \\ a \cdot z = t - 2 \end{array}\right. \]

Subtracting:
\[ a - z - a \cdot z = 2 \]
or
\[ a - a \cdot z = z + 2 \]
and
\[ a(1 - z) = z + 2 \]

Finally:
\[ a = \frac{z + 2}{1 - z} \]

We know that \( a, n, e, l, t, \) and \( z \) are integers. The only integer solutions for \( (z, a) \) are: \((-2, 0), (0, 2), (2, -4),\) and \((4, -2)\).

We find for \( a \): \(2, -2, -4\) and for \( n \): \(10, 34, 342\).

\[ P(x) = x^5 - 10x - 12 = (x - 2)(x^4 + 2x^3 + 4x^2 + 8x + 6) \]
\[ P(x) = x^5 - 34x - 36 = (x + 2)(x^4 - 2x^3 + 4x^2 - 8x - 18) \]
\[ P(x) = x^5 - 342x - 344 = (x + 4)(x^4 - 4x^3 + 16x^2 - 64x - 86) \]

### Possibility 2:
We write the polynomial \( P(x) \) as:
\[ P(x) = x^5 - nx - n - 2 = (x^2 + ax + b)(x^3 + cx^2 + dx + e) \]

Expanding and equating coefficients:
\[ P(x) = x^5 + (a + c)x^4 + (ac + b + d)x^3 + (ad + bc + e)x^2 + (ae + bd)x + be \]

We substitute \( c = -a \):
\[ P(x) = x^5 - (a^2 - b - d)x^3 + (ad - ab + e)x^2 + (ae + bd)x + be \]

We substitute \( d = a^2 - b \):
\[ P(x) = x^5 + (a^3 - 2ab + e)x^2 + (a^2b + ae - b^2)x + be \]

At last, let \( e = a(2b - a^2) \):
\[ P(x) = x^5 - (a^4 - 3a^2b + b^2)x - ab(a^2 - 2b) \]

Because \( P(x) = x^5 - nx - n - 2 \), we have:
\[ a^4 - 3a^2b + b^2 = n \]
\[ ab(a^2 - 2b) = n + 2 \]

Subtracting:
\[ a^4 - 3a^2b + b^2 - ab(a^2 - 2b) = -2 \]

This is a quadratic equation in \( b \):
\[ (2a + 1)b^2 - (a + 3)a^2b + a^4 + 2 = 0 \]

The only integer solution is \( a = -1 \), \( b = -3 \), and \( n = 19 \):
\[ P(x) = x^5 - 19x - 21 = (x^2 - x - 3)(x^3 + x^2 + 4x + 7) \]

The final answer is \( \boxed{ n = 10, 34, 342, 19 } \)