# n = 3
# m = 12
# r = [3, 12]
# n = 2
# m = 5
# r = [1, 10]
def solution(n, m):
def gcd(a0,b0):
a = max(a0,b0)
b = min(a0,b0)
while b != 0:
r = a % b
a = b
b = r
return a
def lcm(a, b):
return int((a * b) / gcd(a, b))
answer = [gcd(n,m),lcm(n,m)]
return answer
# answer = solution(n,m)
# print(answer)