Dynamics of the cosmological and Newton’s constant