On the computation of the GCD (LCM) of 2-d polynomials