N-body dynamics on closed surfaces: the axioms of mechanics