num1, num2 = list(map(int, input().split()))



import math

def gcd(num1, num2):

  for i in range(min(num1, num2),0,-1):

    if num1%i==0 and num2%i==0:

      return i

    

print((int(num1*num2/gcd(num1,num2))))
a,b = list(map(int,input().split()))



def euclid(num1,num2):

  if num1<num2: num1,num2 = num2,num1

  while num2>0:

    r = num1%num2

    num1 = num2

    num2 = r

  return num1



gcd = euclid(a,b)

lcm = int(a*b/gcd)

print(lcm)

num1, num2 = list(map(int, input().split()))
import math


def gcd(num1, num2):
    for i in range(min(num1, num2), 0, -1):
        if num1 % i == 0 and num2 % i == 0:
            return i


print((int(num1 * num2 / gcd(num1, num2))))

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


def euclid(num1, num2):
    if num1 < num2:
        num1, num2 = num2, num1
    while num2 > 0:
        r = num1 % num2
        num1 = num2
        num2 = r
    return num1


gcd = euclid(a, b)
lcm = int(a * b / gcd)
print(lcm)

-num1, num2 = list(map(int, input().split())) -import math +a, b = list(map(int, input().split())) -def gcd(num1, num2): -    for i in range(min(num1, num2), 0, -1): -        if num1 % i == 0 and num2 % i == 0: -            return i +def euclid(num1, num2): +    if num1 < num2: +        num1, num2 = num2, num1 +    while num2 > 0: +        r = num1 % num2 +        num1 = num2 +        num2 = r +    return num1 -print((int(num1 * num2 / gcd(num1, num2)))) +gcd = euclid(a, b) +lcm = int(a * b / gcd) +print(lcm)