Contraction of surfaces in hyperbolic space and in sphere