Greatest Common Factor Using Factor Trees