what types of problems can be solved using the greatest common factor and what types of problems can be solved using the least common multiple