We give a description of pairs of complex rational functions A and U of degree at least two such that for every d ≥ 1 the algebraic curve A •d (x) − U (y) = 0 has a factor of genus zero or one. In particular, we show that if A is not a "generalized Lattès map", then this condition is satisfied if and only if there exists a rational function V such that U • V = A •l for some l ≥ 1. We also prove a version of the dynamical Mordell-Lang conjecture, concerning intersections of orbits of points from P 1 (K) under iterates of A with the value set U (P 1 (K)), where A and U are rational functions defined over a number field K.