You’ve asked for two, but there are three factors according to Newton’s theory of gravity. They are:the mass of the object,the mass of the source of the gravitational field andthe distance between the object and the source.An object’s gravitational potential energy is directly proportional to the negative of the product of the first two factors mentioned above (the masses), and inversely proportional to the third (the distance).