Exponential sums and polynomial congruences in two variables: the quasi-homogeneous case