  We prove that, if the closed unit ball of a normed space $X$ has sufficiently
many extreme points, then every mapping $\Phi$ from $X$ into itself with the
following property is affine: For any pair of points in $X$, there exists a
(not necessarily linear) surjective isometry on $X$ that coincides with $\Phi$
at the two points. We also consider surjectivity of such a mapping in some
special cases including C$^*$-algebras.
