Necessary and sufficient conditions for local manipulation of multipartite pure quantum states