On an inverse problem for the Newtonian potential