# 最小公倍数

import fractions



a, b = list(map(int, input().split()))





def lcm(x, y):

    return (x * y) // fractions.gcd(x, y)





print((lcm(a, b)))

a, b = list(map(int, input().split()))





def gcd(a, b):

    if a > b:

        a, b = b, a

    while a > 0:

        a, b = b % a, a

    return b





def lcm(a, b):

    return (a * b) // gcd(a, b)





print((lcm(a, b)))

# 最小公倍数
import fractions

a, b = list(map(int, input().split()))


def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


print((lcm(a, b)))

a, b = list(map(int, input().split()))


def gcd(a, b):
    if a > b:
        a, b = b, a
    while a > 0:
        a, b = b % a, a
    return b


def lcm(a, b):
    return (a * b) // gcd(a, b)


print((lcm(a, b)))

-# 最小公倍数 -import fractions - -def lcm(x, y): -    return (x * y) // fractions.gcd(x, y) +def gcd(a, b): +    if a > b: +        a, b = b, a +    while a > 0: +        a, b = b % a, a +    return b + + +def lcm(a, b): +    return (a * b) // gcd(a, b)