Note, that
the compositions with
and
can tell us only something about the behaviour of
on
and
.
Any discontinuity outside these points cannot be detected by
or
,
respectively. For a concrete counterexample consider
given
by
The compositions above give constant maps (which are known to be continuous), but
cannot be
continuous, since
is
path-connected, but
is not.