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 = (int(x) for x 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):
import math


def inputIntList():
    return [int(s) for s in input().split()]


def inputInt():
    return int(input())


def main():
    A, B = inputIntList()
    ans = 0
    step = max(A, B)
    another = min(A, B)
    for i in range(step, A * B+1, step):
        if i % another == 0:
            ans = i
            break
    return ans


if __name__ == "__main__":
    print(main())

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):
from fractions import gcd

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

Solution (Python):
a,b = input().split()
c = int(a)
d = int(b)
for i in range(1,d+1):
    if c*i%d == 0:
        e = c*i
        break
    else:
        pass
print(e)

Solution (Python):
def gcd(x, y):
    while y:
        x, y = y, x % y
    return x


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


def solve(a, b):
    return lcm(a, b)


def main():
    a, b = map(int, input().split())
    res = solve(a, b)
    print(res)


def test():
    assert solve(2, 3) == 6
    assert solve(123, 456) == 18696
    assert solve(10000, 99999) == 999990000


if __name__ == "__main__":
    test()
    main()

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

a,b = ( int(x) for x in input().split() )

min_ = min([a,b])

ret = a * b

for i in reversed(range(1,min_+1)):
  if a % i == 0 and b % i == 0:
    ret = int(a * b / i)
    break

print(ret)

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):
def lcm(x, y):
    a,b = x,y
    if a < b:
        a, b = b, a
    while a % b != 0:
        a, b = b, a % b
    
    return int(x * y / b)

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

print(lcm(a,b))

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

if B>A:
  C=B
  B=A
  A=C
for i in range(2,A+1):
  while 1:
    wareru=0
    if round(int(A/i)*i,0)==A:
      wareru=1
      A/=i
    if round(int(B/i)*i,0)==B:
      wareru=1
      B/=i
    if wareru==0:
      break
    else:
      seki*=i
print(round(seki))

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())
new = (a * b) // fractions.gcd(a, b)
print(new)

Solution (Python):



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

c = a * b

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

d = gcd(a, b)

print(int (c / d))

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 a if (b==0) else gcd(b,a%b)

a,b = [int(i) for i in input().split()]
print(int(a*b/(gcd(a,b))))

Solution (Python):
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
 
d = [int(i) for i in input().split()]
 
print(lcm(d[0],d[1]))

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())
f=fractions.gcd(a,b)
f2=a*b//f
print("{}".format(f2))

Solution (Python):
A, B = [int(x) for x 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() )
import fractions
div = fractions.gcd( A, B )
print( A * B // div )

Solution (Python):
import math as mt
a,b=map(int,input().split())
tem=max(a,b)
c=1
if a==b:
    print(a)
elif min(a,b)==1:
    print(max(a,b))
elif a%b==0 or b%a==0:
    print(max(a,b))
else:
        
    while 1:
        c+=1
        if (tem*c)%a==0 and (tem*c)%b==0:
            print(tem*c)
            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 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=(int(x) for x in 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):
from fractions import gcd

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

num = input().split(' ')
a = int(num[0])
b = int(num[1])
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 euclidean(a,b):
    while True:
      r=a%b
      if r==0:
         return b
      a,b=b,r

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

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

Solution (Python):
a,b = list(map(int,input().split()))
c = a*b
if a < b:
    a, b = b, a
while a % b != 0:
    a, b = b, a % b
print(int(c/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 q3(a,b):
  x = a*b
  if(a<b):
    tmp = a
    a=b
    b=tmp
  r=a%b
  while(not(r==0)):
    a=b
    b=r
    r=a%b
  return int(x/b)


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

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

res = a
while res % b != 0:
  res += a

print(res)

Solution (Python):



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

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


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

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

Solution (Python):
A, B = 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(int(A), int(B)))

Solution (Python):
def compute_gcd(x, y):
   while(y):
       x, y = y, x % y
   return x

def compute_lcm(x, y):
   lcm = (x*y)//compute_gcd(x,y)
   return lcm
A, B = [int(i) for i in input().split()]
print(compute_lcm(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):
	if b == 0:
		return a
	else:
		return gcd(b, a%b)

x, y = map(int, input().split())
hcf = gcd(x, y)
lcm = (x * y) / hcf
print(int(lcm))

Solution (Python):
import fractions

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

Solution (Python):
import fractions
a, b = list(map(int, input().split(' ')))
def lcm(a, b):
    return a * b // fractions.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):
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(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))

print(lcm(A, B))

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

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

print(lcm(a, b))

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

from fractions import gcd
def lcm_base(a, b):
	return (a * b) // gcd(a, b)

print( lcm_base(a, b) )

Solution (Python):
a,b = map(int, input().split(' '))
if a > b:
    r = a % b
    b_ = b
    while r != 0:
        temp = b % r
        b = r
        r = temp
    print(b_ * a // b)
elif a < b:
    r = b % a
    a_ = a
    while r != 0:
        temp = a % r
        a = r
        r = temp
    print(a_ * b // a)
else:
    print(b)

Solution (Python):
def g(x, y):
	while y > 0:
		x, y = y, x%y
	return x
def l(x, y):
	return x // g(x, y) * y

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


print(l(a,b))

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

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

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

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

print(r)

Solution (Python):
import math
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):
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)
	
answer = lcm(A, B)
print(answer)

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 = [int(v) for v in input().split()]

minV = min(A, B)
maxV = max(A, B)

if maxV % minV == 0:
  print(maxV)
  exit()

if maxV == minV + 1:
  print(maxV * minV)
  exit()

v = maxV * 2

for i in range(2, minV + 1):
  if v % minV != 0:
    v += maxV
    continue
  print(v)
  exit()

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

str = input()
astr, bstr = str.split(" ")
a = int(astr)
b = int(bstr)

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

Solution (Python):

import numpy as np

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

if b >= a:
    tmp = a
    a = b
    b = tmp

for i in range(b):
    now_num = a * (i + 1)
    if now_num % b == 0:
        ans = now_num
        break
    if i + 1 == b:
        ans = a * b

print(ans)

Solution (Python):
import fractions

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


s=list(map(int,input().split()))
print(lcm(s[0], s[1]))

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

Solution (Python):


p = input().split()
a = int(p[0])
b = int(p[1])

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

print(lcm(a, b))

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

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

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

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

Solution (Python):
A, B = map(int, input().split())
C, D = A, B
while D:
  C, D = D, C % D
print(A * B // C)

Solution (Python):

import fractions
a,b = (int(i) for i in input().split())
print(a * b // fractions.gcd(a, b))

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

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

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())
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):
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):
import fractions

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

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


print(ANS)

Solution (Python):
A,B = map(int,input().split())
def GCD(p,q):
    if p<q:
        p,q = q,p
    r = p
    p = q
    q = r%q
    if q!=0:
        return GCD(p,q)
    else:
        return p
gcd = GCD(A,B)
ans = (A*B)//gcd
print(ans)

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 fractions

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

people = input().split(" ")
pa = int(people[0])
pb = int(people[1])

print(cookie(pa,pb))

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

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


from fractions import gcd

def lcm(x, y):
    return (x * y) // 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(a, b):
    return a * b / gcd(a, b)


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


res = int(lcm(A, B))


print(res)

Solution (Python):


import sys
import os

def getGCD(A, B):
  a, b = A, B
  if B > A:
    a, b = B, A
  r = a%b
  while r != 0:
    a = b
    b = r
    r = a%b
  return b

def problem148C(A, B):
  gcd = getGCD(A, B)
  print(int(A*B/gcd))

if __name__ == "__main__":
  A, B = list(map(int, input().split()))
  problem148C(A, B)

Solution (Python):
from fractions import gcd


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


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

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


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

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

print(lcm(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):
def lcm(a,b):
  m=max(a,b)
  n=min(a,b)
  kk=0
  for j in range(n,a*b+1,n):
 

    if j%a==0 and j%b==0:
      kk=j
      break
  return kk
a,b=map(int,input().split())
c=lcm(a,b)
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())

big = max(A,B)
small = min(A,B)

amari = None
while not amari==0:
    shou = int(big/small)
    amari = big % small 
    if amari == 0:
        not_commonA = A/small
        not_commonB = B/small
    else:
        big = small
        small = amari

print(int(not_commonA * not_commonB * small))

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

for i in range(max(A,B)):
    if A%(i+1)==0 and B%(i+1)==0:
        gcd=i+1

ANS=A*B/gcd

print(int(ANS))

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

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

Solution (Python):
[A, B] = [int(s) for s in input().split()]

def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
print(int(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().split())

print(lcm(a, b))

Solution (Python):
ab = sorted(input().split())
a = int(ab[0])
a_ = a
b = int(ab[1])
b_ = b
c = 1
while c > 0:
    c = a % b
    a = b
    b = c
print(int(a_ * b_ / a))

Solution (Python):
A, B = map(int,input().split())
 
n = max(A,B)
m= min(A,B)
count = 1
while True:
    if (n*count)%m == 0:
        print(n*count)
        break
    else:
        count += 1

Solution (Python):
import fractions
l = input().split()
a = int(l[0])
b = int(l[1])

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):
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(int(x/b))

Solution (Python):
a, b = [int(i) for i in 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 math
import fractions

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    
    return divisors

def bitlist(x,digit):
    res = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        res[i]=now%2
        now = now >> 1
    return res



n,m=list(map(int, input().split()))
print(n*m//fractions.gcd(n,m))

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
print(A * B // fractions.gcd(A, B))

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

Solution (Python):
from fractions import gcd

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):
from fractions import gcd

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

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

def gcd(x, y):
    ma = max(x, y)
    mi = min(x, y)
    while 0 != ma % mi:
        tmp = ma % mi
        ma, mi = mi, tmp
    return mi

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

print(lcm(a,b))

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

def gcd(A,B):
    if A < B:
        A, B = B, A
    while A % B > 0:
        r = A % B
        A,B = B,r
    return B

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

Solution (Python):
a,b = map(int,input().split())
ar = []
br = []
while a % 2 == 0:
    a /= 2
    ar.append(2)
f = 3
while a > 1:
    if(a % f == 0):
        a /= f
        ar.append(f)
    else:
        f += 2
while b % 2 == 0:
    b /= 2
    br.append(2)
f = 3
while b > 1:
    if(b % f == 0):
        b /= f
        br.append(f)
    else:
        f += 2

y = list(set(ar + br))
s = []
for i in y:
    s.append(i**max([ar.count(i),br.count(i)]))
p = 1
for i in s:
  p *= i
print(p)

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 != 0:
        a, b = b, a % b
    return a

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

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

Solution (Python):
import fractions
s, t = input().split()
s = int(s)
t = int(t)
result = s * t / fractions.gcd(s,t)
print(int(result))

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 x%y !=0:
            z =x%y
            x =y
            y =z
        else:
            return z

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

ans = lcm(A, B)
print(ans)

Solution (Python):
l = list(int(x) for x in input().split())
l.sort(reverse=True)

def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a
gcd = gcd(l[0],l[1])

def lcm(a,b):
  return a*b//gcd
print(lcm(l[0],l[1]))

Solution (Python):
a = [int(i) for i in 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[0],a[1]))

Solution (Python):
import fractions
 
a,b=map(int,input().split())
print(int((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 math

li=list(map(int,input().split()))
max_=max(li[0],li[1])

a=[0 for i in range(max_+1)]
b=[0 for i in range(max_+1)]

for i in range(2,li[0]+1):
  while(li[0]%i==0 and li[0]!=1):
    li[0]//=i
    a[i]+=1
for i in range(2,li[1]+1):
  while(li[1]%i==0 and li[1]!=1):
    li[1]//=i
    b[i]+=1

result=1
for i in range(1,max_+1):
  max_num=max(a[i],b[i])
  result*=i**max_num
print(result)

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

count = 2

while True:
  if a == 1:
    aa.append(a)
    break
  if a%count == 0:
    aa.append(count)
    a = a//count
  else:
      count += 1
    
count = 2

while True:
  if b == 1:
    bb.append(b)
    break
  if b%count == 0:
    bb.append(count)
    b = b//count
  else:
      count += 1
answer = 1
c = set(aa) | set(bb)
for i in c:
  answer *= i ** max(aa.count(i), bb.count(i))
print(answer)

Solution (Python):
from fractions import gcd

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

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

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

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

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 PGCD(a,b):
    while b!=0:
        a,b=b,a%b
    return a
def ppcm(a,b):
    return a*b//PGCD(a,b)
A,B = map(int,input().split())
print(ppcm(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())

memo = 0
if A < B:
    A, B = B, A

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

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

if A >= B:
    maxi = A
    mini = B
else:
    maxi = B
    mini = A

ans = mini

while(1):
    if ans % A == 0 and ans % B == 0:
        break
    ans += mini

print(ans)

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
A,B = input().split(" ")
A = int(A)
B = int(B)


print(int(A*B/fractions.gcd(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 = [int(n) for n in input().split()]
x = max(A, B)
y = min(A, B)
N = 10**5+1
for i in range(1, N):
    if (x*i)%y == 0:
        print(x*i)
        break

Solution (Python):


''' 
------------------------
author : iiou16
------------------------
'''
import fractions

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

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


if __name__ == '__main__':
    main()

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())
p=max(a,b)
q=min(a,b)
c=p%q
while c>0:
    p=q
    q=c
    c=p%q
print(a*b//q)

Solution (Python):

import fractions

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

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

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

Solution (Python):
import fractions

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

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

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

Solution (Python):

import fractions




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


if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int,input().split())
c=a
d=b
if a<b:
    tmp=a
    a=b
    b=tmp
r=a%b
while r!=0:
    a=b
    b=r
    r=a%b
ans=round((c*d)/b)
print(ans)

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):
    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=input().split()
a=int(A)
b=int(B)
def gcd(s,t):
	while t:
		s,t=t,s%t
	return s
def lcm(s,t):
	return s*t//gcd(s,t)
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):
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 gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def lcm(a, b):
    return a * b // gcd(a, b)
ab = list(map(int,input().split()))
a = ab[0]
b = ab[1]
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
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)
lcm=A*B//C
print(lcm)

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())
aList = {}
bList = {}
result = 0

i = 1
while result == 0:
    aList[a * i] = 0
    bList[b * i] = 0
    if (b * i) in aList:
        result = b * i
    elif (a * i) in bList:
        result = a * i
    i += 1
print(result)

Solution (Python):
A,B=map(int,input().split())
import fractions
print(int(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):
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(i) for i in input().split()]
print(lcm(a, b))

Solution (Python):
import fractions

s = raw_input().split()

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



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

Solution (Python):
import fractions

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

k = fractions.gcd(a, b)

ans = (a * b) // k

print(ans)

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

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

print(lcm(a, b))
"""

a = list(map(int, input().split()))
ans = a[0]
for i in range(1, N):
      ans = ans * a[i] // fractions.gcd(ans, a[i])
      print(ans)
"""

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 sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)

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


for b in range(1, B + 1):
    A_x = b * A
    if A_x % B == 0:
        print(A_x)
        exit()

Solution (Python):
import fractions
A, B = list(map(int, input().split()))
print(int(A*B /fractions.gcd(A,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):


from fractions import gcd

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(int(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):
A,B = map(int,input().split())

flg = True

C=1
while flg:
  M = min(A,B)
  flg = False
  for m in range(M,1,-1):
    if A%m==0 and B%m==0:
      B=int(B/m)
      A=int(A/m)
      C=C*m
      flg = True
      break
      
print(A*B*C)

Solution (Python):
[a,b] = [int(x) for x in 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(int(x/b))

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

def solve():
  ans = (a * b) // gcd(a, b)
  print(ans)

def main():
  solve()


if __name__ == "__main__":
  main()

Solution (Python):
import math
a,b=map(int,input().split())
x=a*b
if(a<b):
    a,b=b,a
r=a%b
while(r!=0):
    a=b
    b=r
    r=a%b
print(int(x/b))

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

print(lcm([A, B]))

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(int(x/b))

Solution (Python):
import fractions
import math

a,b = map(lambda x:int(x), input().split())


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

Solution (Python):
input_data = input().split(' ')

data = [int(input_data[i]) for i in range(2)]
if(data[0] < data[1]):
    local = data[0]
    data[0] = data[1]
    data[1] = local

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


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

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

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

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

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

Solution (Python):
import sys
import fractions

str = sys.stdin.readline()

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

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

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

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

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

print(lcm(a, b))

Solution (Python):
A,B = list(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)))