Title: The problem of the calculus of variations in m-space with end points variable on two manifolds