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):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


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


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


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


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v

def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


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


main()

Solution (Python):

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

def gcd(a,b):
    x = max(a,b)
    y = min(a,b)
    if x % y == 0:
        return y
    else:
        while True:
            if x % y != 0:
                z = x % y
                x = y
                y = z
            else:
                break
        return z


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

ans = lcm(a,b)
print(ans)

Solution (Python):
import fractions

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

if __name__ == '__main__':
    solve()

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):
a,b = map(int,input().split())
if b%a == 0:
    print(max(a,b))
else:
    x = a
    y = 0
    while x!=y:
        y = y+b
        while x < y:
            x = x+a
    print(x)

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

def gcd(x,y):
	return x if y==0 else gcd(y,x%y)

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

Solution (Python):
def gcd(x,y):
  a = max(x,y)
  b = min(x,y)
  if a%b==0:
    return b
  else:
    while a%b!=0:
      c = a%b
      a = b
      b = c
    else:
      return c

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

k,l = list(map(int, input().split()))
print(lcm(k,l))

Solution (Python):

a, b = [ int(_) for _ in input().split() ]

for i in range(1, b+1):
  if a*i % b == 0:
    lcm = i
    break
    
print(a*i)

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

Solution (Python):
import fractions

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

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

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):
import fractions
a,b=map(int, input().split())
print((a*b)//fractions.gcd(a,b))

Solution (Python):
from sys import stdin
import fractions





a,b = [int(x) for x in stdin.readline().rstrip().split()]

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

Solution (Python):

def gcd(m, n):
    while(m % n != 0):
        tmp = n
        n = m % n
        m = tmp
    return n

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

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

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

gcd = -1
for i in range(max(a,b), 0, -1):
    if a % i == 0 and b % i == 0:
        gcd = i
        break

print(a*b//gcd)

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

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):
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):
import fractions
a, b = map(int,input().split())
print(a * b //fractions.gcd(a, b))

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

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())
"""a,bの最大公約数"""
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

"""a,bの最小公倍数"""
def lcm(a,b):
    return a*b//gcd(a,b)
print(lcm(a,b))

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr

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

fb = factorization(B)

ans = A
for b, n in fb:
  c = 0
  for i in range(1, n+1):
    if ans % (b**i) == 0:
      c = i
    else:
      break
    
  ans *= (b**(n-c))
  
  
print(ans)

Solution (Python):
guests = raw_input().split()
max = int(max(guests))
min = int(min(guests))
snack = 1
while (max * snack) % min != 0:
  snack = snack + 1
print max * snack

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

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

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

print(lcd(A,B))

Solution (Python):
from fractions import gcd

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

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

X = 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(X//B)

Solution (Python):
a, b = map(int, input().split())
m,n=max(a,b),min(a,b)
for i in range(1,m+1):
    k,l=max(n*i,m),min(n*i,m)
    if k%l==0:
        print(k)
        break

Solution (Python):

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

Solution (Python):
def gcd(x, y):
    for i in range(min(x, y), 1, -1):
        if x % i == 0 and y % i == 0:
            return i


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


i = list(map(int, input().split()))
g = gcd(i[0],i[1])
if g != None:
    print(int(lcm(i[0],i[1])))
else :
    print(i[0] * i[1])

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

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

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

x, y = [int(a) for a in input().split()]

print(int(x*y / gcd(x, y)))

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

a, b = A, B
while b > 0:
    a, b = b, a % b

print(A * B // a)

Solution (Python):
import fractions 

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

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

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

Solution (Python):
import fractions
a,b = [int(i) for i in input().split()]
print( a * b // fractions.gcd(a,b))

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

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32

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

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

def solve(A: int, B: int):
    print(lcm(A,B))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

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):
n,m =map(int,input().split())
n2=max(n,m)
m2=min(n,m)
while m2!=0:
    tmp=n2
    n2=m2
    m2=tmp%m2
print(int(n*m/n2))

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

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

if a<b:
    c=a
    a=b
    b=c

while b>0:
    c=a
    a=b
    b=c%b

print(aa*bb//a)

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

Solution (Python):
import fractions

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

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

Solution (Python):
import fractions

a,b = [int(i) for i in input().split()]

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

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

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

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):
A, B = map(int, input().split())
C = A * B
      
    
for i in range(1, 10**5):
    if (A * i) % B == 0:
        print(A * i)
        break

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

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

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



for i in range(1,100000,1):
  if A > B:
  	C = A * i
  else:
    C = B *i
  
  if A > B:
  	D = B
  else:
    D = A
    
  if C % D == 0:
    print(C)
    break

Solution (Python):

import sys


def solve(A: int, B: int):
    def lcm(x, y):
        return (x * y) // gcd(x, y)

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

    print(lcm(A,B))
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

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

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

p = 1


if A > B:
    for y in range(100000000):
        e = (A * p) % B
        o = (A * p)
        if e == 0:
            print(int(o))
            break
        else:
            p += 1
else:
    for r in range(100000000):
        e = (B * p) % A
        o = (B * p)
        if  e == 0:
            print(int(o))
            break
        else:
            p += 1

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):
def lcm(a, b):
    old_old_a = a
    old_old_b = b
    while b != 0:
        old_a = a
        a = b
        old_b = b
        b = old_a % b
    g = old_b
    return old_old_a / g * old_old_b


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

Solution (Python):
A,B=map(int,input().split())
C=1
D=A
E=B
if A<=B:
    if B%A==0:
        print(B)
    else:
        for k in range(2,int(B**(1/2)+2)):
            if A%k==0 and B%k==0:
                A=A/k
                B=B/k
                C=int(A*E)
                while True:
                    if A%k==0 and B%k==0:
                        A=A/k
                        B=B/k
                        C=int(A*E)
                    else:
                        break
        if C==1:
            C=int(A*B)
        print(C)
else:
    if A%B==0:
        print(A)
    else:
        for k in range(2,int(A**(1/2)+2)):
            if A%k==0 and B%k==0:
                A=A/k
                B=B/k
                C=int(D*B)
                while True:
                    if A%k==0 and B%k==0:
                        A=A/k
                        B=B/k
                        C=int(D*B)
                    else:
                        break
        if C==1:
            C=int(A*B)
        print(C)

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

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

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())
maxim = max(A, B)
mini = min(A, B)
l = maxim
for i in range(0, 10**5):
  if l % mini == 0:
    print(l)
    break
  else:
    l += maxim

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

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

print(x)

Solution (Python):

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

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

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

print(lcm(A, B))

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

x,y = map(int,input().split())
print(lcm(x,y))

Solution (Python):
joukyuukokuminndomo=input().split(' ')
joukyuukokuminn2=int(joukyuukokuminndomo[0])
simojimo2=int(joukyuukokuminndomo[1])
joukyuukokuminn=joukyuukokuminn2
simojimo=simojimo2

while joukyuukokuminn%simojimo!=0:
  if joukyuukokuminn>simojimo:
    joukyuukokuminn=joukyuukokuminn-simojimo
  elif joukyuukokuminn<simojimo:
    simojimo=simojimo-joukyuukokuminn

if joukyuukokuminn>=simojimo:
  print(int(joukyuukokuminn2*simojimo2/simojimo))
elif joukyuukokuminn<simojimo:
  print(int(joukyuukokuminn2*simojimo2/joukyuukokuminn))

Solution (Python):
def gcd(a,b):
  if(a==0):
    return b
  return gcd(b%a,a)
def lcm(a,b):
  return int((a*b)/gcd(a,b))
a,b=(int(i) for i in input().split())
print(lcm(max(a,b),min(a,b)))

Solution (Python):
import fractions

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

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

print(int(lcm(A, B)))

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

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

Solution (Python):
from sys import stdin
import fractions





a,b = [int(x) for x in stdin.readline().rstrip().split()]

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

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):
N,S = map(int, input().split())
tmp = 1
a = 1
while True:
  if N // 2 < a and S // 2 < a:
    break
  if N % a == 0 and S % a == 0:
    N,S = N // a, S // a
    tmp *= a
    a = 1
  a += 1

print(tmp * S * N)

Solution (Python):
import fractions
a=input().split()
A=int(a[0])
B=int(a[1])
def lcm(x,y):
  return(x*y)//fractions.gcd(x,y)
print(lcm(A,B))

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

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

print (int(a*b/gcd(max(a,b),min(a,b))))

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

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
ans = a * b / gcd(a,b)
print(int(ans))

Solution (Python):

value = input().split()
value_1 = [int(n) for n in value]

sea = value_1[0]
mou = value_1[1]

while sea != mou:
    if sea<mou:
        sea = sea+value_1[0]
    else:
        mou = mou+value_1[1]

print(sea)

Solution (Python):
import fractions


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

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


if __name__ == "__main__":
    main()

Solution (Python):
a, b = [int(i) for i in input().split()]
m = min(a, b)
for i in range(m, 0, -1):
    if a%i == 0 and b%i ==0:
        break
print(int(a * b/i))

Solution (Python):
def gcd(x, y):

    if x > y:
        smaller = y
    else:
        smaller = x
    for i in range(1, smaller+1):
        if((x % i == 0) and (y % i == 0)):
            hcf = i 
    return hcf
a,b=input().strip().split(" ")
a,b=[int(a),int(b)]
c=gcd(a,b)
d=a*b
ans=d//c
print(ans)

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

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
	
def lcm(x, y):
    return (x * y) // gcd(x, y)

print(lcm(a, b))

Solution (Python):
import fractions

if __name__ == "__main__":
    A, B = input().split()
    A = int(A)
    B = int(B)
    ret = (A * B) // fractions.gcd(A, B)
    print(ret)

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) 


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

Solution (Python):
num_list = input().split() 

number=0

for i in range(1,1000000):
  if (int(num_list[0]) * i) % int(num_list[1]) == 0:
    number = int(num_list[0]) * i
    break

print(number)

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

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())

i = 1
while(True):
    c = a * i
    if c % b == 0:
        break
    
    i += 1
    
print(c)

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))

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

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

Solution (Python):
A,B = (int(x) for x in input().split())
if A%2==0:
  a=A//2
else:
  a=(A+1)//2  

d=1
s=0
d=int(d)
for i in range(a): 
  if A%d==0 and B%d==0:
    s=d
  d+=1
if s==1 :
  print(int(A*B))
elif B%A==0:
  print(B)
elif A%B==0:
  print(A)

else:
  print(int(A*(B/s)))

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

for i in range(b, 10**10, b):
  if i % min(a) == 0:
    print(i)
    break

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

x = max(a, b)
y = min(a, b)
if x % y == 0:
    gcd = y
else:
    while x % y != 0:
        z = x % y
        x = y
        y = z
    gcd = z

ans = a * b / gcd

print(int(ans))

Solution (Python):
from fractions import gcd
X = input().split(" ")
A = int(X[0])
B = int(X[1])
C = A * B
D = gcd(A,B)
print(C // D)

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

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
apri = prime_factorize(a)
bpri = prime_factorize(b)
ans_lis = []
for i in range(len(apri)):
    if bpri.count(apri[i]) > 0:
        bpri.remove(apri[i])
    ans_lis.append(apri[i])
ans_lis.extend(bpri)
ans = 1
for i in range(len(ans_lis)):
    ans = ans * ans_lis[i]
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())

l = a if a<b else b
x = a*b

for i in range(l, 0, -1):
    if a%i == 0 and b%i == 0:
        print(int(x / i))
        exit()

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

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


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


if __name__ == '__main__':
    main()

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())

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

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 = list(map(int,input().split()))
print(int(lcm(a,b)))

Solution (Python):
import math
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())


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


print(lcm(a, b))

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

for i in range(2, a):
  while a % i ==0:
    if b % i ==0:
      c = c*i
      a = a/i
      b = b/i
    else:
      c = c*i
      a = a/i

c = int(a*b*c)
print(c)

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() )

import fractions

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

Solution (Python):
l =input().split()

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


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(int(lcm(a,b)))

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

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

Solution (Python):
import math
from fractions import gcd

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

(a, b) = [int(e) for e in input().split(" ")[:2]]
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):
number_of_guests = input().split()

A = int(number_of_guests[0])
B = int(number_of_guests[1])


A_divisors = []
x = 2
while True:
    if (A % x == 0):
        A /= x
        A_divisors.append(x)
    else:
        x += 1

    if (A <= 1):
        break

y = 2
B_divisors = []
while True:
    if (B % y == 0):
        B /= y
        B_divisors.append(y)
    else:
        y += 1

    if (B <= 1):
        break

A_only = [x for x in A_divisors if (x not in B_divisors)]
B_only = [y for y in B_divisors if (y not in A_divisors)]

common_divisors = []
for z in (A_divisors + B_divisors):
    if z in A_divisors and z in B_divisors:
        if (A_divisors.count(z) >= B_divisors.count(z)):
            common_divisors.append(z**A_divisors.count(z))
        else:
            common_divisors.append(z**B_divisors.count(z))

        A_divisors = list(filter(lambda x: x != z, A_divisors))
        B_divisors = list(filter(lambda x: x != z, B_divisors))


result = 1
for x in A_only + B_only + common_divisors:
    result *= x

print(result)

Solution (Python):
a, b = input().split()
product = int(a) * int(b);
complete = product
tmp = product
for i in range(2, min(int(a), int(b)) + 1):
    tmp = product / i
    if tmp % int(b) == 0 and tmp % int(a) == 0:
        complete = tmp
print(int(complete))

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

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

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

Solution (Python):
import fractions

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

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

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

m = A
n = B

while (m % n != 0):
    tmp = n
    n = m % n
    m = tmp
    
ans = A * B / n

print(int(ans))

Solution (Python):

import fractions

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

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

"""
/を使うと結果が小数floatになるため、
小数点以下を切り捨て整数の除算結果を
返す//（整数除算）を使っている。
"""

Solution (Python):
a, b = map(int, input().split())
t = 0
w = 0
k = a*b
if a > b:
    t = b
    w = a
else:
    t = a
    w = b
for i in range(1,t):
    if w * i % t == 0:
        k=w*i
        break
print(k)

Solution (Python):
A,B=(int(x) for x in input().split())

a=max(A,B)
b=min(A,B)
while True:
  if a%b==0:
    break
  else:
    a,b=b,a%b
  
o=int(A*B/b)
print(o)

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

large_num = 0
small_num = 0
if a > b:
  large_num = a
  small_num = b
else:
  large_num = b
  small_num = a

div_result = 0

for n in range(large_num):
  result1 = large_num%(n+1)
  result2 = small_num%(n+1)
  if result1==0 and result2 ==0:
    div_result = n+1

result = int(large_num/div_result*small_num)
print(result)

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


def gcd(a, b):
    """Compute the greatest common divisor of a and b"""
    while b > 0:
        a, b = b, a % b
    return a


def lcm(a, b):
    """Compute the lowest common multiple of a and b"""
    return a * b / gcd(a, b)

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

Solution (Python):
import fractions

x,y=map(int, input().split()) 

ans=(x * y) // fractions.gcd(x, y)

print(ans)

Solution (Python):
A, B=[int(i) for i in 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):
a,b=map(int,input().split())
x=a*b
if(a<b):
    temp=a
    a=b
    b=temp

r=a%b
while(r!=0):
    a=b
    b=r
    r=a%b

print(x//b)

Solution (Python):
a,b = [int(_) for _ in input().split()]

a_bun = []
b_bun = []

i = 2
a_target = a
while i <= a_target: 
  if a_target % i == 0:
    a_bun.append(i)
    a_target = int(a_target /i)
  else:
    i= i + 1

i = 2
b_target = b
while i <= b_target: 
  if b_target % i == 0:
    b_bun.append(i)
    b_target = int(b_target /i)
  else:
    i= i + 1


result = 1
for i in a_bun:
  result = result * i
  if i in b_bun:
    b_bun.remove(i)

for j in b_bun:
  result = result * j

print(result)

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):
A, B = map(int,input().split())
import fractions
def lcm(A,B):
    return (A * B) // fractions.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)

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

    return A,B


def solve(A,B):
    ans=lcm(A,B)
    return ans


if __name__ == '__main__':
    A,B = read()
    print("%d" % solve(A,B))

Solution (Python):

import sys

def gcd(A,B):
    while B:
        A, B = B, A % B

    return A

def solve(A: int, B: int):
    print( (A*B) // gcd(A, B))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

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

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

print(lcm(a, b))

Solution (Python):

import numpy as np
A, B = map(int, input().split())

L = max(A, B)
S = min(A, B)
flag = 1
while(flag == 1):
  
  if(L % S == 0):
    flag = 0
    lval = S
  else:
    tmp = L % S
    L = S
    S = tmp

Ar = A // lval
Br = B // lval

print(int(lval*Ar*Br))

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

Solution (Python):
import math

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

a,b = A,B

if a < b:
    a, b = b, a
while a % b != 0:
    a, b = b, a % b

S = b

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

print(lcm(A, B))

Solution (Python):
import fractions

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

Solution (Python):

a,b = map(int,input().split())
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

aa = (prime_factorize(a))
bb = (prime_factorize(b))

def f(a1, b1):
  result = []
  for i in sorted(set(a1 + b1)):
    aa1 = [x for x in a1 if x == i]
    bb1 = [x for x in b1 if x == i]
    result += aa1 if len(aa1) < len(bb1) else bb1
  return result

from operator import mul
from functools import reduce

aabb1 = f(aa,bb)

if aabb1 == []:
    aabb1 = [1,1]

aabb = reduce(mul,aabb1)

print(int(a*b/aabb))

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

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

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

print(lcm(a, b))

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


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

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

print(lcm(a,b))

Solution (Python):
import fractions

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

from fractions import gcd

A,B = map(int,read().split())
answer = A * B // gcd(A,B)
print(answer)

Solution (Python):
from fractions import*;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))