A Gröbner basis criterion for birational equivalence of affine varieties Nash resolution for binomial varieties as Euclidean division. A priori termination bound, polynomial complexity in essential dimension 2 