  In this paper we give a solution of the following problem: under what
conditions on infinite compact sets $K_1,K_2\subset \C$ and polynomials $f_1,$
$f_2$ the preimages $f_1^{-1}\{K_1\}$ and $f_2^{-1}\{K_2\}$ coincide. Besides,
we investigate some related questions. In particular, we show that polynomials
sharing an invariant compact set distinct from a point have equal Julia sets.
