Let (M,d),(N,p),(Y,q) be metric spaces. A function f:MxN-->Y is called separately continuous if for every and , the function and , given by and , are continuous.

Prove that every continuous function f:MxN-->Y is separately continuous.

the deinition given is confusing, I have not done any separately continuous question before, need some help here.