Force of gravitation between two balls is given by the formula
[tex]F = \frac{Gm_1 m_2}{r^2}[/tex]
here we know that
[tex]m_1[/tex] = mass of ball 1
[tex]m_2[/tex] = mass of ball 2
[tex]r[/tex] = distance between two balls
So here the two factors that will affect the force of gravitation is
1. Distance between two balls
2. mass of two balls
Here balls do not move due to gravitation attraction force because here the force of gravitation is very small as it is compared with other forces like frictional force between balls and ground.
So this weak gravitational force is balanced by frictional force on balls
SO all balls remains at rest