A Method for Finding the Greatest Common Factor and Least Common Multiple