  The first and the second Zagreb eccentricity index of a graph $G$ are defined
as $E_1(G)=\sum_{v\in V(G)}\varepsilon_{G}(v)^{2}$ and $E_2(G)=\sum_{uv\in
E(G)}\varepsilon_{G}(u)\varepsilon_{G}(v)$, respectively, where
$\varepsilon_G(v)$ is the eccentricity of a vertex $v$. In this paper the
invariants $E_1$, $E_2$, and the Wiener index are compared on graphs with
diameter $2$, on trees, on a newly introduced class of universally diametrical
graphs, and on Cartesian product graphs. In particular, if the diameter of a
tree $T$ is not too big, then $W(T) \ge E_2(T)$ holds, and if the diameter of
$T$ is large, then $W(T) < E_1(T)$ holds.
