最大公约数和最小公倍数代码1234567891011def gcd(m, n): if m < n: return gcd(n, m) while n: m, n = n, m % n return mif __name__ == '__main__': nums = [int(x) for x in input().split(' ')] print(gcd(nums[0], nums[1]), nums[0]*nums[1] // gcd(nums[0], nums[1]))