Duplicate of find out lcm and gcd. Thread closed.