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 fractions

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



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

print(lcd_ab)

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

Solution (Python):
def primeFactorization(n):
    num = n
    tmp = 3
    result = []
    
    while num % 2 == 0:
        result.append(2)
        num //= 2
    
    while tmp * tmp <= num:
        while num % tmp == 0:
            result.append(tmp)
            num //= tmp
        tmp += 2
    
    if tmp != 1:
        result.append(num)
    
    return result

if __name__ == "__main__":
    ab = input().split(" ")
    a = primeFactorization(int(ab[0]))
    b = primeFactorization(int(ab[1]))
    
    result = 1
    ptr_a = 0
    ptr_b = 0
    while ptr_a < len(a) and ptr_b < len(b):
        if a[ptr_a] == b[ptr_b]:
            result *= a[ptr_a]
            ptr_a += 1
            ptr_b += 1
        elif a[ptr_a] < b[ptr_b]:
            result *= a[ptr_a]
            ptr_a += 1
        else:
            result *= b[ptr_b]
            ptr_b += 1

    while ptr_a < len(a):
        result *= a[ptr_a]
        ptr_a += 1
    while ptr_b < len(b):
        result *= b[ptr_b]
        ptr_b += 1

    print(result)

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

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

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

Solution (Python):
import sys
from pprint import pprint
import fractions

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

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

if __name__ == '__main__':
    a, b = map(int, sys.stdin.readline().strip().split(" "))
    solve(a, b)

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

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

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

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

Solution (Python):
import fractions

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

print(int(a[0]*a[1]/fractions.gcd(a[0], a[1])))

Solution (Python):


import sys
import math
import itertools

debug = False

def log(text):
    if debug:
        print(text)


def gcd(a, b):

    c = min(a, b)
    d = max(a, b)
    r = 0    
    while True:
        r = d % c
        if r == 0:
            break
        d = c
        c = r

    return c

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


def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        
        lines.append(input())

    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    

    (a, b) = [int(e) for e in lines[0].split(" ")]

    return (a, b)


def solve(a, b):

    
    return lcm(a, b)


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

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())
c=A*B/gcd(A,B)
print(int(c))

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

def solve(a,b):
	if b == 0:
		return a
	return solve(b, a%b)
print(a*b//solve(a,b))

Solution (Python):


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

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

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

Solution (Python):
A,B=map(int,input().split())
M=max(A,B)
m=min(A,B)
r=M%m
while r!=0:
  M=m
  m=r
  r=M%m
a1=A//m
b1=B//m
print(a1*b1*m)

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

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

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

print(lcm(A, B))

Solution (Python):
from fractions import gcd
(A, B), = [list(map(int, s.split())) for s in open(0)]
print(int(A * B / gcd(A, B)))

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

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):


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

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


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

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


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


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


print(lcm(A, B))

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

Solution (Python):
from sys import stdin 
import fractions
a,b = [int(x) for x in stdin.readline().rstrip().split()]
answer = a * b // fractions.gcd(a, b)
print(answer)

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

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

print(lcm(m,n))

Solution (Python):

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(m,n):
    return int(m * n/gcd(m,n))

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

Solution (Python):
import fractions

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

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

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

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

print(lcm(m,n))

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

Solution (Python):
import math
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)
  if temp!=1:
    arr.append(temp)
  if arr==[]:
    arr.append(n)
  return arr

def main():
  a,b = map(int,input().split())
  a_ary = factorization(a)
  b_ary = factorization(b)
  
  result = 1
  for n in a_ary:
    result *= n
    if (n in b_ary):
      i = b_ary.index(n)
      b_ary.pop(i)
  for n in b_ary:
    result *= n
  
  print(result)

main()

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

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

a, b = [int(i) for i in input().split()]
small = min(a,b)
big = max(a,b)

multi = 1
ans = big
while True:
    ans = big * multi
    if (ans % small) == 0:
        break
    multi += 1

print(ans)

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


A, B = map(int, input().split())
print(int(A * B/gcd(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
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 numpy as np

input_line = input().split()

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

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):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

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

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

print(lcm(A, B))

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

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

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

while B:
    A,B = B,A%B

print(r//A)

Solution (Python):
import fractions

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

Solution (Python):
from sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]

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 = fetch_int_input()
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):
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

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

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

Solution (Python):
import fractions

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


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


solve()

Solution (Python):

def gcd(a, b):
	while b:
		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):

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

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

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):
def gcd(a, b):
    while b != 0:
        a, b = b, a%b
    return a

A, B = (int(i) for i in input().split())
print(int(A*B / gcd(A, B)))

Solution (Python):
from fractions import gcd
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    print((A * B) // gcd(A, B))


if __name__ == "__main__":
    main()

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

Solution (Python):
a, b = map(int, input().split())
a1 = [0 for i in range(100005)]
b1 = [0 for i in range(100005)]
x = 2
while a != 1:
    if not (a % x):
        a = a // x
        a1[x] += 1
    else:
        x += 1
x = 2
while b != 1:
    if not (b % x):
        b = b // x
        b1[x] += 1
    else:
        x += 1
lcm = 1
for i in range(100003):
    if a1[i] or b1[i]:
        lcm *= pow(i, max(a1[i], b1[i]))
print(lcm)

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

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):
from fractions import gcd
A,B=map(int, raw_input().split())

def lcm(x, y):
    return (x * y) // 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):
import math
import fractions

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

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

print(lcm(A, B))

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

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

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

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


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

if __name__ == '__main__':
  a, b = map(int, input().split())
  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):
num=list(map(int,input().split()))
import fractions
g=fractions.gcd(num[0],num[1])
ans=int((num[0]*num[1])/g)
print(ans)

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


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

Solution (Python):
import fractions

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


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


print(lcm(a,b))

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

Solution (Python):
a, b = map(int, input().split())
 
def devide_ok(x, y):
  if y / x == y // x:
    return True
  else:
    return False
  
for i in range(1, b + 1):
  if a * i >= b and devide_ok(b, a * i):
    print(a * i)
    break

Solution (Python):
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
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
A, B = map(int, open(0).read().split())
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

print(lcm(A, B))

Solution (Python):
import numpy as np

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

Solution (Python):
import fractions

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


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


print(lcm(x, y))

Solution (Python):
import fractions

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

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

ans = lcm(a, b)

print(ans)

Solution (Python):
from fractions import gcd

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

print(lcm(a, b))

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

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

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

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

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

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

Solution (Python):
from fractions import gcd

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

print(ans)

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())
temp = b
hoge = a
if a < b:
    a, b = b, a
while a % b != 0:
    a, b = b, a % b
print(hoge*temp//b)

Solution (Python):
import fractions

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

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


print(myans)

Solution (Python):
a,b=map(int, input().split())
c=1
while (a*c)%b!=0:
  c+=1
print(a*c)

Solution (Python):

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

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

from fractions import gcd

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

res = lcm(A, B)

print(res)

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

print(ans)

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(lcm(A,B))

Solution (Python):

import math
import fractions

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

print((x * y) // fractions.gcd(x, y))

Solution (Python):
def gcd(x,y):
    if x<y:
        x,y=y,x
    if y==0:
        return x
    return gcd(y,x%y)
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())
gcd=fractions.gcd(a, b)
print(int(a*b/gcd))

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

Solution (Python):

import math
import datetime
import itertools
import sys
import copy






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


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


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

Solution (Python):
import fractions 

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

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

Solution (Python):
from sys import stdin
f_i = stdin

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

def gcd(x, y):
    if x < y:
        x, y = y, x
    while y > 0:
        r = x % y
        x = y
        y = r
    return x

G = gcd(A, B)
L = (A // G) * (B // G) * G
print(L)

Solution (Python):
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) 
    
s,t = map(int,input().split())
d = s * t // gcd(s, t)
print(d)

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

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

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())
ans = lcm(a, b)
print(ans)

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b = INTM()
    c =min(a,b)
    d=max(a,b)
    if d%c ==0:
        print(int(d))
    else:
        while d%c!=0:
            e = d%c
            d = c
            c = e

        print(int(a*b/e))
if __name__ == '__main__':
    do()

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

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

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

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

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

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

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

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



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


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

Solution (Python):

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

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

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


    
if __name__=="__main__":
    main()

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

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


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


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

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

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

a = prime_factorize(A)
b = prime_factorize(B)

common = []
only_a = []
for i in a:
  if i in b:
    common.append(i)
    b.remove(i)
  else:
    only_a.append(i)

p = 1
for x in common + only_a + b:
  p *= x
print(p)

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

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

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

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

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

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

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

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

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

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

print(ans)

Solution (Python):

def gcd(a,b) :
    if  b == 0:
        return a
    return gcd(b,a%b)
a, b = map(int, input().split() )


print( a * b // 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):
import fractions

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

Str = input().split(" ")
Num1 = int(Str[0])
Num2 = int(Str[1])

print(lcm(Num1,Num2))

Solution (Python):
import sys
from fractions import gcd

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    A, B = MAP()
    
    lcm = lambda x, y: (x * y) // gcd(x, y)
    print(lcm(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):
import fractions

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

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

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

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

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

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

def acinput():
    return list(map(int, input().split(" ")))


a,b=acinput()

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)
ans = lcm(A,B)
print(ans)

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

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

Solution (Python):
import fractions

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

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

Solution (Python):
a,b = map(int,input().split())
x=max(a,b)
y=min(a,b)

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

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

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())
print(lcm(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):

si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
from fractions import gcd
def lcm(x, y):
    """
    xとyの最小公倍数を求める。

    Parameters
    ----------
    x,y : int
        自然数

    Returns
    -------
        最小公倍数：int

    """
    return (x * y) // gcd(x, y)

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

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

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

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

print(ans * A)

Solution (Python):
AB = list(map(int, input().split()))
AB.sort()
i = 2 
j = 1 
while 1:
        if AB[0] * i == AB[1] * j:
                print(AB[0] * i)
                break
        if AB[0] * i > AB[1] * j:
                j += 1
        else:
                i += 1

Solution (Python):
import fractions

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

Solution (Python):

import sys


def gcd(a,b):
    while b!=0:
        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):
import fractions

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

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

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

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

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

gab = fractions.gcd(a, b)

ans = (a // gab) * (b // gab) * gab

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


print(lcm(a,b))

Solution (Python):
a, b = map(int, input().split())
if a<b: a,b=b,a
c = a*b
while b: a, b = b, a%b
print(c//a)

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 collections
import math
import operator as op
from functools import reduce
import numpy as np
import math
import bisect

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

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

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

    ans = lcm(A, B)

    print(ans)


if __name__ == '__main__':
    main()

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

x = A*B

if A < B:
    t =A
    A = B
    B = t

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

print(int(x/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())
s = max(a, b)

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

print(i)

Solution (Python):

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

tmp_a = a
tmp_b = b

while tmp_a != tmp_b:
    if tmp_a < tmp_b:
        tmp_a += a
    else:
        tmp_b += b
print(tmp_a)

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

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

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

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

def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
print(int(a*b/gcd(a,b)))

Solution (Python):
a, b = map(int, input().split())
def gcd(a, b):
    '''ユークリッド互除法を使った最大公約数の求め方'''
    while b != 0:
        a, b = b, a % b
    return(a)
 
def lcm(a, b):
    '''最小公倍数の求め方'''
    return a * b // gcd(a, b)
print(lcm(a, b))

Solution (Python):
from functools import reduce
from fractions import gcd


def least_common_multiple(iter):
    '''
    最小公倍数を返す
    '''
    lcm = lambda x, y: x*y//gcd(x, y)
    return reduce(lcm, iter)


AB = map(int, input().split())
print(least_common_multiple(AB))

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

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

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