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 math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools
from collections import Counter

def main():
    a,b = map(int, input().split())
    ans = max(a,b)
    first = ans
    m = min(a,b)
    while True:
        if ans%m == 0:
            print(ans)
            exit()
        ans += first

if __name__=="__main__":
    main()

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

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

print(lcm(a, b))

Solution (Python):
import math
a,b = map(int,input().split())
print(a * b // math.gcd(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):
 if y==0:return x
 else:return gcd(y, x % y)
def lcm(x,y):
  return x/gcd(x, y)*y;
print(int(lcm(*map(int,input().split()))))

Solution (Python):
def gcd (a,b):
  if a%b==0:
    return b
  if b%a==0:
    return a
  if a>b:
    return gcd(b,a%b)
  return gcd(a,b%a)
def lcm (a,b):
  return ((a*b)//gcd(a,b))
inp=list(map(int,input().split()))
a=inp[0]
b=inp[1]
print (lcm(a,b))

Solution (Python):
def solve():
    from math import gcd
    n, k = map(int, input().split())
    print(n * k // gcd(n, k))


solve()

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

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

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

import math

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

print(lcm(A,B))

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

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

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

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

import math

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

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

Solution (Python):
import math

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

Solution (Python):
import math

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

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

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

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

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

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

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

def lcm(a,b):
    ori_a=a
    ori_b=b
    while b!=0:
        a,b=b,a%b
    return (ori_a*ori_b)//a

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

Solution (Python):
import sys
import math


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instr = lambda: sys.stdin.readline()
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

a,b=inintm()

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

print(lcm(a,b))

Solution (Python):
from math import gcd

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

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

Solution (Python):
import math

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

print(lcm(a, b))

Solution (Python):
import fractions


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


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

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

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

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

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

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

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

Solution (Python):
import math

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

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

print(lcm(A,B))

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

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

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

Solution (Python):

def lcms(*numbers):
    from math import gcd
    from functools import reduce
    def lcm_base(x, y):
        return (x * y) // gcd(x, y)
    return reduce(lcm_base, numbers)

def resolve():
    A, B = list(map(int, input().split()))
    print(lcms(A, B))



if '__main__' == __name__:
    resolve()

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

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

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

def larger(x,y):
  if x>y:
    return x
  else:
    return y

L=larger(A,B)
S=A+B-L


r=L%S
while r!=0:
  L=S
  S=r
  r=L%S
  

p=(A*B)//S
print(p)

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

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

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

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

l = lcm(a, b)
print(min(l,a*b))

Solution (Python):














































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    
    A, B = list(map(int, lines[0].split()))
    
    
    
    
    
    
    
    

    import math
    result = (A*B) / math.gcd(A, B)
    result = int(result)
    
    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2 3']
        lines_export = [6]
    if pattern == 2:
        lines_input = ['123 456']
        lines_export = [18696]
    if pattern == 3:
        lines_input = ['100000 99999']
        lines_export = [9999900000]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

Solution (Python):
import math

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

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

print(lcm(a, b))

Solution (Python):
import math


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


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


if __name__ == '__main__':
    main()

Solution (Python):
import math

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

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

Solution (Python):
import math

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

Solution (Python):
from math import gcd

def readinput():
    a,b=map(int,input().split())
    return a,b

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

if __name__=='__main__':
    a,b=readinput()
    ans=main(a,b)
    print(ans)

Solution (Python):
import math

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

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

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

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

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

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

Solution (Python):
import numpy as np

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

print(np.lcm(A, B))

Solution (Python):
import math

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

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

print(lcm(A, B))

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

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

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

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

Solution (Python):
import math
A, B = [int(i) for i in input().split()]
print((A * B) // math.gcd(A, B))

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

Solution (Python):
a,b=[int(i) for i  in input().split()]
c=max(a,b)
if(a<=b):
    d=a
else:
    d=b
for i in range(1,100001):
    if((d*i)%c==0):
        print(d*i)
        break

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

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

Solution (Python):
from math import gcd

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

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

print(lcm)

Solution (Python):
import math

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

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

print(lcm(A,B))

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

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

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

print(lcm(a, b))

Solution (Python):


import math

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

Solution (Python):


import math

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

Solution (Python):
import math

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

Solution (Python):
from math 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 math
a,b = map(int,input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
 
print(lcm(a, b))

Solution (Python):
import math

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

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

Solution (Python):
import math

def lcm(x,y):
  return x*y//math.gcd(x,y)
A,B=map(int,input().split())
print(lcm(A,B))

Solution (Python):
import math

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

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

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

import math
print(int(a*b/math.gcd(a,b)))

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

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


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

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


if(__name__ == '__main__'):
  main()

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

Solution (Python):
from sys import exit
def main():
  A, B = map(int, input().split())
  
  if A % B == 0:
    print(A)
    exit()
  elif B % A == 0:
    print(B)
    exit()
  elif A == B :
    print(A)
    exit()
    
  large = 0
  small = 0
  if A > B:
    large = A
    small = B
  else:
    large = B
    small = A
    
  i = 2
  while True:
    if (large * i) % small == 0:
      print(large * i)
      exit()
    i += 1
  
  
  
  
  
main()

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):
def gcd(A, B)->int:
  A = A % B
  if A == 0:
    return B
  else:
    return gcd(B, A)
    

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

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

A, B = mapint()
from math import gcd
print(A*B//gcd(A, B))

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

Solution (Python):
A,B = map(int,input().split())
x = A
y = B
while y>0:
    x,y = y,x%y
print((A//x)*B)

Solution (Python):
from math import gcd

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

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

Solution (Python):
from math import gcd

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

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

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

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

import math



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

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

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

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

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

Solution (Python):
import math
A, B = [int(s) for s in input().split(' ')]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(A, B))

Solution (Python):
import math

A, B = [int(s) for s in input().split()]
print(A * B // math.gcd(A, B))

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

Solution (Python):
import os, sys, re, math
from functools import reduce

def lcm(vals):
    return reduce((lambda x, y: (x * y) // math.gcd(x, y)), vals, 1)

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

Solution (Python):
def gcd(a,b):
  if a==0:
    return b
  else:
    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):
import math
a,b = map(int, input().split())
print((a*b)//math.gcd(a,b))

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

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

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

Solution (Python):
import math

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

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

print(lcm(a, b))

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

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

Solution (Python):
import sys
import time
import math
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()


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


ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)

Solution (Python):

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


if A % B == 0:
    print(A)
elif B % A == 0:
    print(B)
else:
    A_, B_ = A, B
    common = 1
    n_max = int(min(A,B)**0.5+1)
    for n in range(2, n_max+1):
        while True:
            if (A_ % n == 0) and (B_ % n == 0):
                common *= n
                A_ = A_ // n
                B_ = B_ // n
            else:
                break

    print(common * A_ * B_)

Solution (Python):
from math import gcd

def snack(a, b):

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

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

if __name__ == '__main__':
    main()

Solution (Python):
n,m=map(int,input().split(" "))
l=max(n,m)
s=min(n,m)
while s!=0:
    tmp = s
    s = l % s
    l = tmp
print(n*m // l)

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

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

Solution (Python):
import math

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

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

Solution (Python):
import math

def solve():
    ans = (A*B) // math.gcd(A,B)
    print(ans)

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

Solution (Python):
import sys 
from math import gcd
from functools import reduce
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B = map(int, readline().split())
AB = []
AB.append(A)
AB.append(B)
lcm = reduce(lambda x,y:x*y//gcd(x,y),AB)
print(lcm)

Solution (Python):
from math import gcd

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7)

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

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

if __name__ == '__main__':
    main()

Solution (Python):
import math

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

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

for i in range(b):
    if c % b == 0:
        break
    c += a

print(c)

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
a,b=map(int,input().split())
for i in range(1,b+1):
    if (a*i)%b==0:
        print(a*i)
        exit(0)

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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

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

print(lcm(a, b))

Solution (Python):
import math

def main():
    A, B = map(int, input().split())
    print((A * B) // math.gcd(A, B))


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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//gcd(a, b)*b
print(lcm(a,b))

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

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


if __name__ == "__main__":
    main()

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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


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

print(lcm(a, b))

Solution (Python):
from math import gcd

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

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

Solution (Python):
import math

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

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

Solution (Python):


import copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

mod = 10**9+7
sys.setrecursionlimit(mod) 

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

A, B = LI()
print(A * B // math.gcd(A, B))

Solution (Python):
import sys
iput = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

def gcd(big, small):
    if small == 0:
        return big
    else:
        return gcd(small, big % small)


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

print(lcm(a, b))

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

Solution (Python):
from math import gcd

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

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

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

Solution (Python):

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

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

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

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

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

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import math

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

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

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

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

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

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

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

Solution (Python):
import math

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

gcd = math.gcd(a, b)

ans = a*b//gcd

print(ans)

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

m = a*b
lst = []
for i in range(1, b+1):
  if m < a*i:
    break
  lst.append(a*i)

for j in lst:
  if j%b == 0:
    print(j)
    break

Solution (Python):
import sys
from math import gcd

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

    return


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
input = sys.stdin.readline
import math
from functools import reduce


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



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


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

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

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

Solution (Python):

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

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

def calculate_lcm(x, y):
    lcm = (x*y)//calculate_gcd(x,y)
    return lcm


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

lcm= calculate_lcm(a,b)

print(lcm)

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

def factorization(n):
    arr = []
    tmp = n

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

a_arr = factorization(a)
b_arr = factorization(b)
a_map = {str(arr[0]):arr[1] for arr in a_arr}
b_map = {str(arr[0]):arr[1] for arr in b_arr}

factor = set(list(a_map.keys())+list(b_map.keys()))
ans = 1
for i in factor:
  if str(i) in a_map.keys():
    a_num = a_map[str(i)]
  else:
    a_num = 0
    
  if str(i) in b_map.keys():
    b_num = b_map[str(i)]
  else:
    b_num = 0
  
  ans *= int(i)**(max(a_num,b_num))
print(ans)

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

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

from math import gcd

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

print(lcm(A, B))

Solution (Python):
import math

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

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

print(lcm(a, b))

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

A, B = list(map(int, readline().split()))

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

    return a

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

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

import math

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

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

Solution (Python):
import math

m,n = map(int,input().split())

print(m*n//(math.gcd(m, n)))

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

Solution (Python):
A, B = map(int, input().split())
L = max(A, B)
S = min(A, B)
ans = L
while True:
    if ans%S==0:
        print(ans)
        break
    ans+=L

Solution (Python):
import math

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

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

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

import math
G = math.gcd(A,B)

print(A*B//G)

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

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

Solution (Python):
import math

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

result = (A * B) // math.gcd(A, B)

print(result)

Solution (Python):

def gcm(m, n):
    
    if m > n:
        _temp = n
        n = m
        m = _temp

    while m != 0:
        
        m, n = n % m, m

    return n

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

print("{}".format((int)(a * b / g)))

Solution (Python):
from math import gcd

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

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

Solution (Python):
import math

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

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

print(lcm(A, B))

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

Solution (Python):
import numpy as np
a, b = map(int, input().split())
print(np.lcm(a, b))

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

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

print(ans)

Solution (Python):
a,b = map(int,input().split())
def gcd(x,y):
  while y!=0:
    x,y = y,x%y
  return x
m = gcd(max(a,b),min(a,b))
print(a*b//m)

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

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

Solution (Python):
import math


def main():
    A, B = map(int,input().split())
    print(int(A*B/math.gcd(A,B)))


if __name__ =="__main__":
    main()

Solution (Python):
def gcd(a,b):
    while True:

        if a >= b:
            x = a
            y = b
        else:
            x = b
            y = a

        mod = x%y

        if mod == 0:
            return y
        
        else:
            a = y
            b = mod

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

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

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

Solution (Python):
import math

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

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

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

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

Solution (Python):
import math
A,B = (int(x) for x in input().split())
print(A*B//math.gcd(A,B))

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

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

print(int(A*B/math.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 // gcd(a, b) * b

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

Solution (Python):
a,b=map(int,input().split())
c=0
d=0
if a<b:
    c=a
else:
    c=b
for i in range(1,c+1):
    if a%i==0 and b%i==0:
        d=i
    
print(a*b//d)

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

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

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
import fractions
 
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
 
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
a, b = M()
ans = lcm(a, b)
print(ans)

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

big = max(a,b)
small = min(a,b)

for x in range(big,big*small+1,big):
    if x % small == 0:
        print(x)
        break

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