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


gcd = fractions.gcd(A,B)

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

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

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

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

print(lcm(a,b))

Solution (Python):
def gcd(A,B):
  r = A % B
  if(r == 0):
    return B
  else:
    return gcd(B,r)
A, B = list(map(int, input().split()))
A, B = max(A,B), min(A,B)
print(A * B // gcd(A,B))

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

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

Solution (Python):
from fractions import gcd
 
def lcm(a, b):
    return abs(a*b) // gcd(a, b)
  
a, b = [int(x) for x in input().split()]
print(lcm(a,b))

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

Solution (Python):
a, b = map(int, input().split())
c = a * b
d = min(a, b)
j = 1
for i in range(2, d + 1):
    j += 1
    if a % j == 0 and b % j == 0:
        c //= j
        a //= j
        b //= j
        j = 1
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())
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):
from  fractions import gcd
a, b = map(int, input().split())

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

print(lcm)

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

C = 0

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

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

count = 1
while True:
    if count*A%B == 0:
        print(count*A)
        break
    else:
        count += 1

Solution (Python):


import sys
import math
import time
import numpy as np
import collections

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


AB = str(raw_input()).split()
A = int(AB[0])
B = int(AB[1])

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

print(ans);

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

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

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

Solution (Python):
import numpy as np

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

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

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

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

Solution (Python):
import os

def main():
    num_a,num_b = (int(x) for x in input().split())
    num_max = num_a * num_b
    
    if (num_b > num_b):
        num = num_a
        num_a = num_b
        num_b = num

    r = num_a % num_b

    while(r != 0):
        num_a = num_b
        num_b = r
        r = num_a % num_b

    print(int(num_max/num_b))

if __name__ == "__main__":
    main()

Solution (Python):
from fractions import gcd

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

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

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

s = A
while s % B != 0:
    s += A
print(s)

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

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

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

Solution (Python):
import fractions

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

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

print(lcm(A, B))

Solution (Python):
A,B=map(int,input().split())
N=min(A,B)
i=X=0

for i in range(N+1,1,-1):
  if A%i==0 and B%i==0:
    X=round(A*B/i)
    break
  else:
    X=round(A*B)

print(X)

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

import fractions

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

print(int(ans))

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

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


def Gcd(a, b):
    a, b = max(a, b), min(a, b)
    while b != 0:
        a, b = b, a % b
    return a


ans = A * B / Gcd(A, B)
print(int(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):

import sys
def input():
    return sys.stdin.readline().rstrip()

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

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

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


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
m,n=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(m,n))

Solution (Python):
class AC:
    @staticmethod
    def inputStr(char):
        return input().split(char)
    
    @staticmethod
    def inputInt(char):
        a = input().split(char)
        for i in range(len(a)):
            a[i] = int(a[i])
        return a

inp = AC.inputInt(" ")
A = inp[0]
B = inp[1]

X = A*B
tmp = 0

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

def gcd(x,y):
    c=x
    d=y
    if y>x:
        x=d
        y=c
    
    if y == 0:
        return x
    
    else:
        return gcd(y,x%y)
    
print(int((a*b)/gcd(a,b)))

Solution (Python):
a,b = map(int,input().split(" "))
x = a
y = b
while True:
    if x == y:
        print(x)
        break
    if x < y:
        x += a
    else:
        y += 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):
  while(y):
    x, y = y, x % y
  return x

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

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

print(lcm(a, b))

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

Solution (Python):

from fractions import gcd
A,B = map(int,input().split())


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

print(lcm(A,B))

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

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

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

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

Solution (Python):
def lcm(m: int, n: int) -> int:
    for x in range(m, n * m + 1, m):
        if x % n == 0:
            return x


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

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

def get_lcm(a, b, gcd=0):
    if gcd == 0:
        return a * b // get_gcd(a, b)
    else:
        return a * b // gcd


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

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

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

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

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


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


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

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 = 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 fractions

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

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

print(lcm(A, B))

Solution (Python):
"""
ユークリッドの互除法により最大公約数を求めます
int a,b
return int
"""
def divisor(a,b):
    if a < b : 
        b += a
        a = b - a
        b -= a

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

"""
最小公倍数を最小公約数から求めます
int a,b
return int
"""
def multiple(a,b):
    c = divisor(a,b)
    return int(a*b/c)

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

print(multiple(a,b))

Solution (Python):
import math

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


C = A * B
C_sqrt_int = int(math.sqrt(C))

for i in range(C_sqrt_int):
    while A%(i+2) == 0 and B%(i+2) == 0:
        C = C / (i+2)
        A = A / (i+2)
        B = B / (i+2)


print(int(C))

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

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

print(lcm(a,b))

Solution (Python):
import fractions

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

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

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


inp = input().split()
x = int(inp[0])
y = int(inp[1])

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

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

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

Solution (Python):
import math

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

    answer = least_common_multiple(A, B)    
    print(answer)

def least_common_multiple(a, b):
    if b > a:
        a, b = b, a
    
    ab = a*b

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

    return int(ab/b)

if __name__ == "__main__":
    resolve()

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

if b > a:
  a, b = b, a

while a % b != 0:
  a, b = b, a%b
 
print(int(ab/b))

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

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

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

Solution (Python):
def gcm(a,b):
    if a==0:
        return b
    elif b==0:
        return a
    else: 
        return gcm(a%b,b) if a>=b else gcm(a,b%a)

def lcn(a,b):
    return a*b//gcm(a,b)

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

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

c=0
if a>=b:
    i=1
    while a*i%b!=0:
        i+=1
    else:
        c=a*i
else:
    j=1
    while b*j%a!=0:
        j+=1
    else:
        c=b*j
    
print(c)

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

prime = [2]
for i in range(3, 10**5, 2):
  flag = True
  for j in prime:
    if j > math.sqrt(i):
      break
    if i % j == 0:
      flag = False
      break
  if flag:
    prime.append(i)

a_dict = dict()
b_dict = dict()
used = set()

for i in prime:
  if a < i and b < i:
    break
  while a % i == 0:
    a /= i
    a_dict[i] = a_dict.get(i, 0) + 1
    used.add(i)
  while b % i == 0:
    b /= i
    b_dict[i] = b_dict.get(i, 0) + 1
    used.add(i)

ab = 1
for i in used:
  ad = a_dict.get(i, 0)
  bd = b_dict.get(i, 0)
  n = ad if ad > bd else bd
  ab = ab * (i**n)
  
print(ab)

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

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

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

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

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

a,b=[int(i) for i in 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)
    if x % y == 0:
        return y
    else : 
        while x % y != 0:
            z = x % y
            x = y
            y = z
        
        return y

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

Solution (Python):
from fractions import gcd

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

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

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

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

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

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

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

main()

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


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


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

print(lcm(A, B))

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


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


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

print(lcm(A, B))

Solution (Python):
A, B = map(int, input().split())
a , b = 0, 0
ans = 0
n = 1
 
for i in range(1, 100001):
  a = A * i
  if ans != 0:
    print(ans)
    break
  for j in range(n, 100001):
    b = B * j
    if a == b:
      ans = a
    elif b < a:
      continue
    else:
      n = j
      break

Solution (Python):
A, B = map(int, input().split())
a , c = 0, 0
ans = 0

if B > A:
  c = B
  B = A
  A = c
 
for i in range(1, B+1):
  a = A * i
  if ans != 0:
    break
  if a % B == 0:
    ans = a
    break
print(ans)

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):
  a,b = min(a,b),max(a,b)
  if b % a != 0:
    return gcd(b%a,a)
  else:
    return a

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

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

print(lcm(A, B))

Solution (Python):


import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: int):
    def gcd(a, b):
        return a if b == 0 else gcd(b, a % b)
    ret = A * B // gcd(A, B)
    print(ret)
    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):

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


def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = gcd(a,l[i])
    return a


def extgcd(a,b):
    r = [1,0,a]
    w = [0,1,b]
    while w[2]!=1:
        q = r[2]//w[2]
        r2 = w
        w2 = [r[0]-q*w[0],r[1]-q*w[1],r[2]-q*w[2]]
        r = r2
        w = w2
    
    return [w[0],w[1]]


def extgcd_2(a,b):    
    g = gcd(a,b)
    a = a//g
    b = b//g
    return extgcd(a,b)


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

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

Solution (Python):
import sys
def input():
  return sys.stdin.readline()[:-1]

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))
    
if __name__ == '__main__':
  main()

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

C = 1
delta = 0.00000001
while( C < B ):
  if C*A % B < delta:
    break
  C+=1
  
print(C*A)

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

def gcd(x, y):
    X = max(x, y)
    Y = min(x, y)

    while True:
        r = X % Y
        X = Y
        Y = r
        if r == 0:
            break
    return X

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

Solution (Python):
import sys
import os
if sys.platform=="darwin":
	base = os.path.dirname(os.path.abspath(__file__))
	name = os.path.normpath(os.path.join(base, '../Documents/input.txt'))
	
	sys.stdin = open(name)

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


import fractions
a = fractions.gcd(x,y)


b = x*y//a

print(b)

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

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

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

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

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

Solution (Python):
import fractions

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

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

Solution (Python):
import fractions

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

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

Solution (Python):
import sys
from fractions import gcd

lines = sys.stdin.readlines()

a, b = map(int, lines[0].split())

x = gcd(a, b)

print(x * (a//x) * (b//x))

Solution (Python):
A, B = map(int, input().split())
f=A
g=B
while f%g != 0:
  f,g = [g, f%g]
print(int(A*B/g))

Solution (Python):
from fractions import gcd

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

Solution (Python):

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

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

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

print(lcm(A,B))

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

Solution (Python):
import fractions as frac

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


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


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

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

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

if a<b:
  a,b = b,a

while a%b!=0:
  tmp = b
  b = a%b
  a = tmp

print(x*y//b)

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

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

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

Solution (Python):
n = list(map(int, input().split()))
a = n[0]
b = n[1]

if a < b:
  min = a
else:
  min = b
  
c = []
i = 2
while i <= min:
  if a % i == 0 and b % i == 0:
    a //= i
    b //= i
    min //= i
    c += [i]
  else:
    i += 1
    

n = 1
for i in range(len(c)):
  n *= c[i]

l = n * a * b

print(l)

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

Solution (Python):
from fractions import gcd
n1, n2  = [int(i) for i in input().split()]

n3 = (n1 * n2) //gcd(n1, n2)

print(n3)

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

Solution (Python):

from fractions import gcd


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


if __name__ == "__main__":
    main()

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

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

Solution (Python):



import sys


def calc_divisor(n):
	div_dic = {}
	if n == 1: return div_dic
	k = 2
	while True:
		
		if n%k == 0:
			if k not in div_dic: div_dic[k] = 0
			div_dic[k] += 1
			n = n//k
			if n == 1: break
		else:
			k += 1
	return div_dic


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


div_dic_a = calc_divisor(a)
div_dic_b = calc_divisor(b)


div_ls = list(div_dic_a) + list(div_dic_b)
div_ls = list({k: 1 for k in div_ls})
div_dic = {k:(div_dic_a[k]
	if div_dic_a.get(k,0) > div_dic_b.get(k,0)
	else div_dic_b[k]) for k in div_ls}



ans = 1
for k in div_dic:
	ans *= k ** div_dic[k]

print(ans)

Solution (Python):
import math

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

def find_divisor(n):
    answer = n
    for i in range(math.floor(math.sqrt(n))):
        if n % (i+2) == 0:
            answer = (i+2)
            break
        else:
            pass
    return answer

A_q_list = []
B_q_list = []
A_dict = {}
B_dict = {}
LCM_pq_list = []
LCM_dict = {}

q = A
for i in range(A):
    while q >= 2:
        divisor = find_divisor(q)
        A_q_list.append(divisor)
        try:
            A_dict[divisor]
        except KeyError:
            A_dict[divisor] = 1
            if divisor not in LCM_pq_list:
                LCM_pq_list.append(divisor)
        else:
            A_dict[divisor] += 1
        q = q // divisor
q = B
for i in range(B):
    while q >= 2:
        divisor = find_divisor(q)
        B_q_list.append(divisor)
        try:
            B_dict[divisor]
        except KeyError:
            B_dict[divisor] = 1
            if divisor not in LCM_pq_list:
                LCM_pq_list.append(divisor)
        else:
            B_dict[divisor] += 1
        q = q // divisor

LCM = 1
for i in LCM_pq_list:
    try:
        A_dict[i]
    except KeyError:
        A_dict[i] = 0
    else:
        pass
    try:
        B_dict[i]
    except KeyError:
        B_dict[i] = 0
    else:
        pass
    LCM_dict[i] = max(A_dict[i], B_dict[i])
    LCM = LCM * i**LCM_dict[i]

print(LCM)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a,b = LI()
    g = fractions.gcd(a,b)

    return a*b//g


print(main())

Solution (Python):
import fractions

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

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

Solution (Python):

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

Solution (Python):
A,B=map(int,input().split())
N=min(A,B)
gcd=1
for n in range(2,N+1):
    if A%n==0 and B%n==0:
        gcd=n
print(A*B//gcd)

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

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

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

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

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

print(lcm(a, b))

Solution (Python):
def gcd(x, y):
    x, y = max(x, y), min(x, y)
    while x % y > 0:
        x, y = y, x % y
    return y

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

Solution (Python):
a, b = map(int, input().split())
def gcd(x, y):
    x, y = max(x, y), min(x, y)
    if y == 0:
        return x
    return gcd(y, x % y)
  
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):
def get_gcd(a, b):
    if a < b:
        a, b = b, a
    r = -1
    while r:
        r = a % b
        a = b
        b = r
    return a

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

Solution (Python):
from sys import stdin
import sys
import math
import numpy as np

def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def rip(sep = ''):
    if sep == '' :
        return map(int, input().split()) 
    else: return map(int, input().split(sep))
def ria(sep = ''): 
    return list(rip(sep))
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()

def main():
    A, B = rip()
    def gcd(a, b):
        return b if a == 0 else gcd(b % a, a)
    g = gcd(A, B)
    print(A // g * B)


if __name__ == "__main__":
    main()

Solution (Python):
from fractions import gcd

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

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

Solution (Python):
a, b = input().split()
a = int(a)
b = int(b)
A = a
B = b
while 1:
    if a < b:
        tmp = a
        a = b
        b = tmp
    r = a % b
    if r == 0:
        GCD = b
        break
    a = b
    b = r
LCM = int(A*B/GCD)
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(" "))

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

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

print(lcm(A, B))

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

  
li= list(map(int,input().strip().split()))

print(fun(li[0],li[1]))

Solution (Python):
a, b = map(int, input().split()) 
count = 1
 
while True:
    aaa = a * count
    if aaa % b == 0:
        print(aaa)
        break

    count += 1

Solution (Python):
import fractions

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

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

Solution (Python):


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

c_a = 1

while True:
    if a*c_a%b == 0:
        break
    c_a += 1

print(a*c_a)

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

if Ar[0]>=Ar[1]:
  A=Ar[0]
  B=Ar[1]
else:
  A=Ar[1]
  B=Ar[0]

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

Ans=int(Ar[0]*Ar[1]/A)
print(Ans)

Solution (Python):


a, b = map(int, input().split())
c = max(a, b)
d = min(a, b)
n = 1
while True:
    if (c * n) %d == 0:
        break
    else:
        n += 1
    
print(c * n)

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

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

Solution (Python):
A, B = list(map(int, input().split(' ')))
max_div_val = 0
min_A_B = min(A, B)
for i in range(min_A_B):
    div_val = i + 1
    if A % div_val == 0 and B % div_val == 0:
        max_div_val = div_val
A_divisor = A // max_div_val
B_divisor = B // max_div_val
print(A_divisor * B_divisor * max_div_val)

Solution (Python):
import math


def euclid(A, B):
    n = max(A, B)
    m = min(A, B)
    while m > 0:
        k = n
        n = m
        m = k % m
    return n


def main():
    numbers = input().split(" ")
    A = int(numbers[0])
    B = int(numbers[1])
    print(round(A * B / euclid(A, B)))


if __name__ == '__main__':
    main()

Solution (Python):
import fractions

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