Greatest Common Factor and Diamond Problems