Problem:
 Score : 300 points    Problem Statement  Takahashi is organizing a party.  At the party, each guest will receive one or more snack pieces.  Takahashi predicts that the number of guests at this party will be A or B .  Find the minimum number of pieces that can be evenly distributed to the guests in both of the cases predicted.  We assume that a piece cannot be divided and distributed to multiple guests.      Constraints   1 \leq A, B \leq 10^5  A \neq B  All values in input are integers.         Input  Input is given from Standard Input in the following format:  A  B       Output  Print the minimum number of pieces that can be evenly distributed to the guests in both of the cases with A guests and B guests.        Sample Input 1 2 3      Sample Output 1 6  When we have six snack pieces, each guest can take three pieces if we have two guests, and each guest can take two if we have three guests.       Sample Input 2 123 456      Sample Output 2 18696       Sample Input 3 100000 99999      Sample Output 3 9999900000

Solution (Python):
A, B = map(int, input().split())
i = max(A, B)
B = min(A, B)
A = i
while i <= A*B:
    if i%B == 0:
        print(i)
        exit()
    i += A

Solution (Python):
from fractions import gcd

A, B = [int(i) for i in input().split()]

ans = A * B // gcd(A, B)
print(ans)

Solution (Python):
import fractions
N=list(map(int,input().split()))
print(int(N[0]*N[1]/fractions.gcd(N[0],N[1])))

Solution (Python):
a,b = list(map(int, input().split()))
max = a
if max < b:
  max = b
p = 1
for i in range(b, 1, -1):
  if a % i == 0 and b % i == 0:
    a = a // i
    b = b // i
    p = i
    break
print(a * b * p)

Solution (Python):
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def lcm(a, b):
	return a * b // gcd (a, b)
A, B = map(int, input().split())

print(lcm(A, B))

Solution (Python):
import fractions
A, B = map(int, input().split(' '))
gcd = fractions.gcd(A, B)
print((A * B) // gcd)

Solution (Python):
import fractions

A,B=map(int, input().split())

print(int(A * B / fractions.gcd(A, B)))

Solution (Python):
import fractions
n = input()    
m = n.split()
p = [int(i) for i in m]
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

print(lcm(p[0], p[1]))

Solution (Python):
from fractions import gcd

def lcm_base(x, y):
    return (x * y) // gcd(x, y)

A,B = (int(i) for i in input().split())

print(lcm_base(A,B))

Solution (Python):
def gcd(a, b):
    while(b):
        a, b = b, a % b
    return(a)

A, B = map(int, input().split())

print(int(A * B / gcd(A, B)))

Solution (Python):
import fractions
A,B = input().split()
A = int(A)
B = int(B)
lcm = int(A*B/fractions.gcd(A,B))
print(lcm)

Solution (Python):
def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))

Solution (Python):
from fractions import gcd
a,b=map(int,input().split())
print(a*b//gcd(a,b))

Solution (Python):
import fractions
 
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
 
a,b=map(int,input().strip().split())
print(lcm(a, b))

Solution (Python):
from fractions import gcd

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

Solution (Python):

def gcd(x, y):
    m = max(x, y)
    n = min(x, y)
    if m % n == 0:
        return n
    else:
        return gcd(n, m%n)
def lcm(x, y):
    return (x * y) // gcd(x, y)

A , B = tuple(list(map(int, input().split(' '))))
if A == 1 or B == 1:
    print(max(A, B))
else:
    print(lcm(A, B))

Solution (Python):
import sys
import fractions

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

a = list(map(int,input().split()))
ans = lcm(a[0], a[1])

print(ans)

Solution (Python):
A,B= map(int, input().split())
def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a

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

print(lcm(A, B))

Solution (Python):
import sys
input = sys.stdin.readline
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    print(A * B // gcd(A, B))
if __name__ == '__main__':
    
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)

Solution (Python):
import fractions

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

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

print(lcm(a, b))

Solution (Python):
from fractions import gcd

A,B = map(int,input().split())

print(A*B//gcd(A,B))

Solution (Python):
strings = input().split(' ')
A = int(strings[0])
B = int(strings[1])

i = min(A,B)
m = max(A,B)
n = min(A,B)
while 1:
    mt = n
    n = m % n
    m = mt
    if n == 0:
        break
if m != 0:
    print(A*B//m)
else:
    print(A*B)

Solution (Python):

import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
  
S, T=map(int, input().split())
print(lcm(S, T))

Solution (Python):
a,b = map(int,input().split())
n3=a
n4=b
while(n4!=0):
    n1 = n3
    n2 = n4
    n4 = n1%n2
    n3 = n2
ans = int((a*b)/n2)

print(ans)

Solution (Python):
A,B=map(int, input().split())

 
def max_(a,b):
    while b!=0:
        a,b=b,a%b
    return a
def min_com(a,b):
    return a*b//max_(a,b)
print(min_com(A,B))

Solution (Python):
a = list(map(int,input().split())) 
c=1
for i in range(1,min(a[0],a[1])+1):
  if a[0]%i==0 and a[1]%i==0:
    c=i
print(a[0]*a[1]//c)

Solution (Python):
import numpy as np
def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x%y == 0:
        return y
    else:
        while x%y!=0:
            z = x%y
            x = y
            y = z
        else:
            return z
        
def lcm(m, n):
    return int(m*n/gcd(m,n))

A, B = list(map(int,input().split()))
ans = lcm(A, B)
print(ans)

Solution (Python):
import fractions
a,b = map(int,input().split())

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

print(int(lcm(a, b)))

Solution (Python):
A,B=map(int,input().split())
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def lcm(a, b):
	return a * b // gcd (a, b)
print(lcm(A,B))

Solution (Python):

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


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

A, B = map(int, input().split())

print(lcm(A,B))

Solution (Python):
import math
import fractions

a = []
a = input().split()
A = int(a[0])
B = int(a[1])

print(int(A * B / fractions.gcd(A, B)))

Solution (Python):
A,B=map(int, input().split())
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def lcm(a, b):
    return a * b // gcd (a, b)
print(lcm(A,B))

Solution (Python):
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	

import fractions
a,b = map(int, input().split())


ans = a*b//fractions.gcd(a,b)
print(ans)

Solution (Python):
import fractions;
a, b=str(input()).split()
print(int(int(a) * int(b) / fractions.gcd(int(a),int(b))))

Solution (Python):
a, b = map(int, input().split())
m,n=max(a,b),min(a,b)
if m%n==0:
    print(m)
else:
    while m%n!=0 and n!=1:
        m%=n
        m,n=max(m,n),min(m,n)
    print(int(a*b/n))

Solution (Python):

import math

def euclid(A,B):
    if A < B:
        A , B = B , A
    quotient = math.floor(A / B)
    surplus = A % B
    if surplus == 0:
        Gretest_common_divisor = B
    else:
        Gretest_common_divisor = euclid(A - B * quotient, B)
    return Gretest_common_divisor

IN = input().split(" ")
A = int(IN[0])
B = int(IN[1])
print(int((A / euclid(A,B)) * B))

Solution (Python):
A, B = map(int, input().split())
for i in range(A, A*B+1, A):
    if i % B == 0:
        print(i)
        break

Solution (Python):
import fractions
A, B = map(int, input(). split())
print(A * B // fractions.gcd(A, B))

Solution (Python):

from sys import stdin

def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a
def lcm(a,b):
	return a*b//gcd(a,b)
A, B = [int(x) for x in stdin.readline().rstrip().split()]
print(lcm(A,B))

Solution (Python):
def gcd(A,B):
    if(A<B):
        tmp=A
        A=B
        B=tmp

    r=A%B

    while(r!=0):
        A=B
        B=r
        r=A%B
        
    return B


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

l = a * b /gcd(a, b)
l = int(l)
print("{}".format(l))

Solution (Python):
def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))

Solution (Python):
a, b = map(int,input().split())
min_num = min(a,b)
max_num = max(a,b)
for i in range(1,10**5 + 1):
    if min_num * i % max_num == 0:
        print(min_num * i)
        break

Solution (Python):
import fractions
a, b = map(int, input().split(' '))

print(int(a * b / fractions.gcd(a, b)))

Solution (Python):
import math as math
A,B = map(int,input().split())
s = 0
l = A
n = B
if B > A :
    A = B
    B = l
while B != 0:
    A, B = B, A%B
    s = A


print(l * n // s)

Solution (Python):

a, b = map(int, input().split())
def gcd(l, m):
    x = min(l, m)
    y = max(l, m)
    if y % x == 0:
        return x
    else:
        while y % x != 0:
            z = y % x
            y = x
            x = z
        else:
            return z

def lcm(s, t):
    ans = s * t // (gcd(s, t))
    return ans

print(lcm(a, b))

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

def prime(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

a = sorted(prime(a))
b = sorted(prime(b))

c = set()


def cal(a, b):
    c = set()
    for i in range(len(a)):
        c.add(a[i])
    for i in range(len(b)):
        c.add(b[i])
    ans = []
    e = 1
    for i in range(len(c)):
        d =c.pop()
        if a.count(d) >= b.count(d):
            for j in range(a.count(d)):
                ans.append(d)
        else:
            for j in range(b.count(d)):
                ans.append(d)

    for i in range(len(ans)):
        e *= ans[i]

    return e

print(cal(a, b))

Solution (Python):
a,b= map(int,input().split())

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

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

Solution (Python):
A, B = map(int, input().split())

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


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

print(lcm(A,B))

Solution (Python):
import fractions

A,B=map(int,input().split())
print(A*B//fractions.gcd(A,B))

Solution (Python):
from fractions import gcd
import sys
sys.setrecursionlimit(100000)

a, b = map(int, input().split())
gcd = gcd(a, b)
if gcd <= 0:
    print(0)
else:
    result = int(a*b / gcd)
    print(result)

Solution (Python):

A,B = map(int,input().split())

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

R = (A * B) / gcd(A, B)

print(int(R))

Solution (Python):
import sys
input = sys.stdin.readline
import fractions

a,b = map(int,input().split())
res = (a*b)//fractions.gcd(a,b)
print(res)

Solution (Python):
def conv(s,b):
    j = 1
    sn = s
    bn = b
    i = 2

    while sn != bn :
        bn = b * j
        while sn < bn :
            sn = s*i
            i += 1
        j += 1
    return bn

def main():
    A,B = map(int,input().split())
    if A > B :
        small = B
        big = A
    else :
        small = A
        big = B
    print(conv(small,big))

main()

Solution (Python):
import fractions
a, b = map(int, input().split())
print(a * b // fractions.gcd(a, b))

Solution (Python):
import sys
bbn=1000000007
	


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

def main():
	a, b = map(int, input().split())
	return a*b//gcd(a,b)
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
import fractions
[A, B] = list(map(int, input().split()))
GCD = fractions.gcd(A, B)
ans = A * B // GCD
print(ans)

Solution (Python):
import fractions
a, b = map(int, input().split())
print(a * b // fractions.gcd(a, b))

Solution (Python):
A, B = map(int, input().split())


def gcd(A, B):
    a = A
    b = B
    while b != 0:
        a, b = b, a % b
    return a


print(A * B // gcd(A, B))

Solution (Python):
a,b = map(int,input().split())

n = max(a,b)
m = min(a,b)

def gcd(n,m):
    l = n % m
    if l == 0:
        return m
    return gcd(m,l)

def lcm(n,m):
    return (n*m) // gcd(n,m)
    
print(lcm(n,m))

Solution (Python):
from fractions import gcd

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


A,B=map(int,input().split())
print(lcm(A,B))

Solution (Python):
import fractions as fr

a, b= map(int, input().split())
def lcm(x,y):
    return (x*y/fr.gcd(x,y))

print(int(lcm(a,b)))

Solution (Python):
input = input().split()
A = int(input[0])
B = int(input[1])

i = A*B
min = 10000000000
for i in range(A):
    if (A*B)%1==0:
        if ((A*B)/(i+1))%A==0 and ((A*B)/(i+1))%B==0:
            min = (A*B)/(i+1)
print(int(min))

Solution (Python):
import fractions
import sys
input = sys.stdin.readline


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


def main():
    A, B = map(int, input().split())

    print(lcm(A, B))


if __name__ == "__main__":
    main()

Solution (Python):
input_nums = list(map(int, input().split()))
num1 = input_nums[0]
num2 = input_nums[1]

def gcd(num1, num2):
    a = max(num1, num2)
    b = min(num1, num2)
    r = a%b
    while(r != 0):
        a = b
        b = r
        r = a%b
    return b
    

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

Solution (Python):
import fractions

A,B =map(int,input().split())
LCM = A*B/fractions.gcd(A,B)
print(int(LCM))

Solution (Python):
import fractions

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

lcm = a*b / fractions.gcd(a,b)

print(int(lcm))

Solution (Python):
a,b=map(int,input().split())

c=a
d=b
e=0
while not min(c,d)==0:
    e=max(c,d)%min(c,d)
    c=min(c,d)
    d=e


print(a*b//c)

Solution (Python):
import math
A, B = map(int, input().split())

A_orgn = A
B_orgn = B



dict_a = {}
dict_b = {}
if A == 1:
    dict_a[1] = 1
  
for i in range(2,int(math.sqrt(A))+1):
    if A % i == 0:
        while(1):
            A //= i
            if i not in dict_a:
                dict_a[i] = 1
            else:
                dict_a[i] += 1
            if A % i != 0:
                break
if A != 1:
    dict_a[A] = 1

if B == 1:
    dict_b[1] = 1
for i in range(2,int(math.sqrt(B))+1):
    if B % i == 0:
        while(1):
            B //= i
            if i not in dict_b:
                dict_b[i] = 1
            else:
                dict_b[i] += 1
            if B % i != 0:
                break
if B != 1:
    dict_b[B] = 1



sum = 1
for i in range(max(A_orgn, B_orgn)+1):
    
    if (i not in  dict_a) and ( i in dict_b):
        
        sum *= i ** dict_b[i] 
        
    elif (i in dict_a) and ( i not in dict_b):
        
        sum *= i ** dict_a[i]
        
    elif (i in dict_a) and ( i in dict_b):
        
        sum *= i ** max(dict_a[i], dict_b[i])
        
print(sum)

Solution (Python):
a,b=map(int,input().split())
import fractions
x=fractions.gcd(a,b)
print(a*b//x)

Solution (Python):
def gcd(m,n):
	x=max(m,n)
	y=min(m,n)
	if x%y==0:
		return y
	else:
		while x%y!=0:
			z=x%y
			x=y
			y=z
		else:
			return z

def lcm(m,n):
	return int(m*n/gcd(m,n))
	
	
a,b=map(int,input().split())
print(lcm(a,b))

Solution (Python):
import fractions

A, B = map(int,input().split())

def lcm(A, B):
    return (A * B) // fractions.gcd(A, B)

print(lcm(A, B))

Solution (Python):
import fractions
x,y = map(int,input().split())
print(x*y//fractions.gcd(x,y))

Solution (Python):
from functools import reduce
import fractions

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

a,b = map(int,input().split(" "))
ans = lcm(a,b)

print(ans)

Solution (Python):
import math

d = input().split(" ")
a = int(d[0])
b = int(d[1])
ans = 1
p = a
if b <= p:
	p = b
for i in range(2, p+1):
	while(a % i == 0 and b % i == 0):
		ans *= i
		a = int(a/i)
		b = int(b/i)
ans = ans * a * b
print(ans)

Solution (Python):
import fractions as math

a  = input()
ans = a.split(" ")

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
  
print(lcm(int(ans[0]), int(ans[1])))

Solution (Python):
import fractions

A, B = list(map(int, input().split()))
print((A * B) // fractions.gcd(A, B))

Solution (Python):

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

def lcm(a, b):
    return a * b // gcd (a, b)
a,b = map(int,input().split())
print(lcm(a,b))

Solution (Python):
def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))

Solution (Python):
a,b = map(int,input().split())

import fractions

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

print(lcm(a, b))

Solution (Python):


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

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

input = input().split(' ')
a = int(input[0])
b = int(input[1])
print(int(lcm(a, b)))

Solution (Python):
import fractions

a = input().split()
a = list(map(int, a))
def lcm(x, y):
    return (x * y) // fractions.gcd(x,y)
print(lcm(a[0],a[1]))

Solution (Python):
import fractions
A,B = list(map(int, input().split()))

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

print(lcm(A, B))

Solution (Python):
def gojo(m, n):
    return m if n == 0 else gojo(n, m % n)

a, b = map(int,input().split())
print(int(a*b/gojo(a,b)))

Solution (Python):
def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a
def lcm(a,b):
  return a*b//gcd(a,b)

num=list(map(int,input().split()))
A=num[0]
B=num[1]
S=lcm(A,B)
print(S)

Solution (Python):
a,b=map(int, input().split())
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def lcm(a, b):
    return a * b // gcd (a, b)
print(int(lcm(a,b)))

Solution (Python):
N=list(map(int,input().split()))
m=int(N[0])
n=int(N[1])
ans=1
while(ans!=0):
    ans=m%n
    if(ans<n and ans!=0):
        m=n
        n=ans
    else:
        pass
print(int((N[0]*N[1])/n))

Solution (Python):
a,b = map(int,input().split())
s = 1

for i in range(b,0,-1):
  if (a % i == 0) and (b % i == 0):
    s = int(a * b / i)
    print(s)
    break

Solution (Python):


import fractions

A, B = map(int, input().split())

print(A * B // fractions.gcd (A, B))

Solution (Python):
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

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

Solution (Python):
import fractions

A, B = map(int, input().split())

Ans = A * B // fractions.gcd(A, B)

print(Ans)

Solution (Python):
def lcm(a):
    from fractions import gcd
    x = a[0]
    for i in range(1, len(a)):
        x = (x * a[i]) // gcd(x, a[i])
    return x

a =  (input().split())
b = [1, 1]
b[0] = int(a[0])
b[1] = int(a[1])
print(lcm(b))

Solution (Python):
def euclid(a, b):
    if b == 0:
        return a
    else:
        return euclid(b, a%b)

def multiple(a, b):
    return a*b // euclid(a, b)

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

print(multiple(a,b))

Solution (Python):

import fractions

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

print(a * b // fractions.gcd(a, b))

Solution (Python):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)
A, B = input().split()
print(lcm(int(A), int(B)))

Solution (Python):
A, B = map(int,input().split())
def min2(A,B):
  C = abs(A - B)
  D = [A, B, C]
  D.sort()
  if D[0] == 1:
    return 1
  elif D[0] == D[1]:
    return D[0]
  else:
    return min2(D[0],D[1])
a = min2(A,B)

print(int(A*B/a))

Solution (Python):
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)

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

temp = lcm(a, b)

print(temp)

Solution (Python):
n=input().split(' ')
a=int(n[0]);b=int(n[1])
def gcd(a,b):
    x=max(a,b);y=min(a,b)
    if x%y==0:
        return y
    while x%y!=0:
        z=x%y ; x=y ; y=z
    return z
print(int(a*b/gcd(a,b)))

Solution (Python):
N = input()
split = N.split(" ")
A = int(split[0])
B = int(split[1])
max_num = A * B
if A < B:
    tmp = A
    A = B
    B = tmp

r = A % B
while r != 0:
    A = B
    B = r
    r = A % B
max_num /= B 
print(int(max_num))

Solution (Python):
import fractions
A,B=map(int,input().split())

print(A*B//fractions.gcd(A,B))

Solution (Python):
import fractions
A,B = map(int, input().split())
print(A*B//fractions.gcd(A,B))

Solution (Python):
p1, p2 = map(int, input().split())

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

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

lcm = lcm(p1, p2)
print(int(lcm))

Solution (Python):
A, B = map(int, input().split())
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a
print((A*B)//gcd(A,B))

Solution (Python):
import collections

def prime_factorize(n):
    
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


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

if a == 1 or b == 1:
    print(a*b)
    exit()

a_dic = collections.Counter(prime_factorize(a))
b_dic = collections.Counter(prime_factorize(b))

target_list = list(set(list(a_dic.keys()) + list(b_dic.keys())))

result = 1

for i in target_list:
    if i in a_dic and i in b_dic:
        value = max(a_dic[i], b_dic[i])
    elif i not in b_dic:
        value = a_dic[i]
    else:
        value = b_dic[i]
    result *= i ** value

print(result)

Solution (Python):
p1, p2 = map(int, input().split())

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

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

lcm = lcm(p1, p2)
print(int(lcm))

Solution (Python):
import math
import numpy as np
a0,b0 = (int(i) for i in input().split())
a = a0
b = b0
if a<b:
  tmp = a
  a = b
  b = tmp
r = a%b
while r != 0:
  a = b
  b = r
  r = a%b
ans = a0*b0//b
print(ans)

Solution (Python):
import math

A, B = map(int, input().split())

if A < B:
	ans = B
	while ans % A != 0:
		ans += B
	print(ans)
else:
	ans = A
	while ans % B != 0:
		ans += A
	print(ans)

Solution (Python):
a = [int(i) for i in input().split()]
b = a[0]
c = a[1]
def gcd(b,c):
    while c!=0:
        b,c=c,b%c
    return b

div = gcd(b,c)
ans = b*c//div
print(ans)

Solution (Python):
p1, p2 = map(int, input().split())

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

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

lcm = lcm(p1, p2)
print(int(lcm))

Solution (Python):
from fractions import gcd
a, b = map(int, input().split())
print(a * b // gcd(a, b))

Solution (Python):
def gcd(m,n):
  x = max(m,n)
  y = min(m,n)
  if x % y == 0:
    return y
  else:
    while x % y != 0:
      z = x % y
      x = y
      y = z
    else:
      return z

def lcm(m,n):
  return int((m*n)/gcd(m,n))

numbers = input().split(" ")
num1 = int(numbers[0])
num2 = int(numbers[1])
print(lcm(num1,num2))

Solution (Python):
a = [int(i) for i in input().split()]
if a[0] > a[1]:
  pass
else:
  b = a[0]
  c = a[1]
  a[0] = c
  a[1] = b

b = a[0]
c = a[1]

import fractions

g = fractions.gcd(b,c)

print(int((b * c) / g))

Solution (Python):
A, B = map(int, input().rstrip().split())

X = A * B


if A < B:
    tmp = B
    B = A
    A = tmp

r = A % B
while (r != 0):
    A = B
    B = r
    r = A % B

print(int(X/B))

Solution (Python):
a,b = map(int, input().split())
 
 
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a


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

Solution (Python):
s=input().split()
a=int(s[0])
b=int(s[1])
for i in range(100000000000):
  if i!=0:
    if a*i%b==0:
      print(a*i)
      break
    if b*i%a==0:
      print(b*i)
      break

Solution (Python):
N,M = map(int,input().split())

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y
    return x

g = gcd(N,M)
n=N/g
m=M/g

print(int(n*m*g))

Solution (Python):
def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))

Solution (Python):
A,B=map(int,input().split())

product=A*B

if(A<B):
    tmp=A
    A=B
    B=tmp

r=A%B

while(r!=0):
    A=B
    B=r
    r=A%B

print(int(product/B))

Solution (Python):
def gcd(n, m):
    r = n % m
    if r == 0:
        return m
    else:
        return gcd(m, r)


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

Solution (Python):
import fractions

a,b = map(int,input().split())
print(a*b//fractions.gcd(a,b))

Solution (Python):
A, B = list(map(int, input().split()))
i = 1
if A <= B:
  N = B
  while (N % A) != 0:
    i += 1
    N = B * i
else:
  N = A
  while (N % B) != 0:
    i += 1
    N = A * i
print(N)

Solution (Python):
num_list = [int(i) for i in input().split()]

result = 0

if num_list[0] < num_list[1]:
    A = num_list[0]
    B = num_list[1]
else:
    A = num_list[1]
    B = num_list[0]

while True:
    amari = A % B
    if amari == 0:
        break
    A = B
    B = amari




result =  num_list[0] * num_list[1] // B

print(result)

Solution (Python):
def gcd (a,b):
    if b ==0:
        return a
    else:
        return gcd(b, a%b)
a,b = [int(i) for i in input().split()]
val = gcd(a,b)
prod = a*b
ans = int(prod/val)
print(ans)

Solution (Python):
a,b = [int(i) for i in input().split()]
a_ = []
b_ = []
for i in range(1,a+1):
    if a%i == 0:
        a_.append(i)

for i in range(1,b+1):
    if b%i == 0:
        b_.append(i)

for i in a_[::-1]:
    if i in b_:
        m = i
        break


print(a*b//m)

Solution (Python):
import fractions
a,b = map(int,input().split())
def lcm(x,y):
    return (x * y) // fractions.gcd(x,y)
print(int(lcm(a,b)))

Solution (Python):
def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))

Solution (Python):
def LCM(x, y):
    set1 = set(range(x, x*y+1, x))
    set2 = set(range(y, x*y+1, y))
    set3 = set1&set2
    return min(set3)
a, b = map(int, input().split())
print(LCM(a, b))

Solution (Python):
def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))

Solution (Python):

import fractions
def answer(A, B):
  return round(A * B / fractions.gcd(A, B))

A, B = map(int, input().split())
X = answer(A, B)
print(X)

Solution (Python):
a, b = map(int, input().split())

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

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

print(lcm(a,b))

Solution (Python):
import fractions

kazu = list(map(int,input().split()))

a = kazu[0]
b = kazu[1]

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

print(lcm(a, b))

Solution (Python):
import sys
input = sys.stdin.readline
import fractions

A,B = map(int, input().split())

lcm = A * B // fractions.gcd(A,B)

print(lcm)

Solution (Python):

import sys
import itertools



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


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

A, B=input().split()
A=int(A)
B=int(B)
print(lcm(A, B))

Solution (Python):
a, b = map(int, input().split())

def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x%y == 0:
        return y
    else:
        while x%y != 0:
            z = x%y
            x = y
            y = z
        else:
            return z

result = a * b / gcd(a, b)

print(int(result))

Solution (Python):
import fractions
(A, B) = list(map(int, input().split()))
print((A * B) // fractions.gcd(A, B))

Solution (Python):
H = list(map(int, input().split()))
A = H[0]
B = H[1]


for i in range(1,B+1):
    
    if (A*i % B == 0):
        
        print(A*i)
        break

Solution (Python):
a, b = map(int, input().split())

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

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

print(lcm(a,b))

Solution (Python):
import math

def computeGCD(x, y):
    if x > y:
        small = y
    else:
        small = x
    for i in range(1, small+1):
        if((x % i == 0) and (y % i == 0)):
            gcd = i
    return gcd
A, B = map(int, input().split())

print( (A*B)//computeGCD(A, B))

Solution (Python):
if __name__=='__main__':
    a,b=map(int,input().split())
    A=a
    B=b
    while b!=0:
        a,b=b,a%b
    ans=a*(A//a)*(B//a)
    print(ans)

Solution (Python):
import math
A,B=map(int,input().split())

if A<B:
  a,b=B,A
else:
  a,b=A,B
for s in range(int(math.sqrt(b))+1):
  X=abs(a-b)
  if a>X:
    if b>X:
      a,b=b,X
    else:
      a=X
  a,b=b,a%b
  if b==0:
    break
print(A*B//a)

Solution (Python):

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

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

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

print(lcm(a,b))

Solution (Python):
a, b = map(int, input().split())
x = a * b
tmp = 0

if a < b:
  tmp = a
  a = b
  b = tmp

r = a % b
while not r == 0:
  a = b
  b = r
  r = a % b

print(int(x / b))

Solution (Python):
import fractions
def lcm (a,b) :
    return (a * b) // fractions.gcd(a,b)

A,B = map(int,input().split())
ans = lcm(A,B)
print(ans)

Solution (Python):
A, B = map(int, input().split())

k = B
while True:
    if k % A ==0:
        ans = k
        break
    else:
        k += B

print(ans)

Solution (Python):
import sys
from fractions import gcd

def main():
    A, B = map(int, input().split())

    print(int(A * B / gcd(A, B)))

main()

Solution (Python):
import fractions
a, b = map(int, input().split())
print(a * b // fractions.gcd(a, b))

Solution (Python):
import math

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


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

a, b = map(int, input().split())
print(lcm(a, b))

Solution (Python):
from fractions import gcd
a,b = map(int,input().split())
def lcm(x,y):
    return x*y//gcd(x,y)
print(lcm(a,b))

Solution (Python):
import sys
import math
if sys.version_info.minor >= 5:
    from math import gcd
else:
    from fractions import gcd

A, B = map(int, input().split())
g = gcd(A, B)
print(A * B // g)

Solution (Python):
def gcd(A,B): 
    if A == 0: 
        return B 
    return gcd(B % A, A) 
  
def lcm(A,B): 
    return (A*B) / gcd(A,B)

A,B = map(int,input().split())
print(int(lcm(A,B)))

Solution (Python):

a, b = map(int, input().split())
s, t = max(a, b), min(a, b)
c = s%t
while (c != 0):
    s = t
    t = c
    c = s%t

ans = a * b//t
print(ans)

Solution (Python):
from fractions import gcd
import sys
input = sys.stdin.readline



def main():
    b, c = [int(i) for i in input().split()]
    ans = b*c//gcd(b, c)
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
def gcd(a,b):
    return a if (b==0) else gcd(b,a%b)
a,b = map(int,input().split())
print(int((a*b)/gcd(a,b)))

Solution (Python):
import fractions

str = input().split(" ")

a = int(str[0])
b = int(str[1])

print(a * b // fractions.gcd(a,b))

Solution (Python):
A,B = list(map(int, input().split()))

def gcd(a, b):
  
  
  if a < b:
    a, b = b, a

  if a % b == 0:
    return b
  else:
    return gcd(b, a % b)

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

Solution (Python):
import fractions

def s(a, b):
    y = a*b / fractions.gcd(a, b)
    return int(y)
  
a = [int(i) for i in input().split()]

x = s(a[0],a[1])
print(x)

Solution (Python):
import sys
sys.setrecursionlimit(100001)

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

A, B = [int(n) for n in input().split()]

s = A * B // gcd(A, B)

print(s)