def solution(n, m):
    answer = []
    big = max(n, m)
    small = min(n, m)
    for i in range(small, -1, -1):
        if not small % i and not big % i:
            answer.append(i)
            break
    i = 1
    while True:
        if not big * i % small:
            answer.append(big * i)
            break
        i += 1
    return answer

35cd817ba69e17bc9f437c74dd3e49fba603c802
<mask token>

def solution(n, m):
    answer = []
    big = max(n, m)
    small = min(n, m)
    for i in range(small, -1, -1):
        if not small % i and not big % i:
            answer.append(i)
            break
    i = 1
    while True:
        if not big * i % small:
            answer.append(big * i)
            break
        i += 1
    return answer
