Harryxun/stf_run huggingface dataset:
A, B = list(map(int, input().split()))

def calc_num(N):
  if N==0:
    return 0
  if N % 4 == 1:
    return (1, 0)
  if N % 4 == 2:
    return (N, 1)
  if N % 4 == 3:
    return (0, 0)
  return (N, 0)

A, subA = calc_num(A-1)
B, subB = calc_num(B)

print(A^B^subA^subB)


### FIXED CODE ###

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

def calc_num(N):
  if N==0:
    return 0
  if N % 4 == 1:
    return 1
  if N % 4 == 2:
    return N ^ 1
  if N % 4 == 3:
    return 0
  return N ^ 0

A = calc_num(A-1)
B = calc_num(B)

print(A^B)
def resolve():
    H = int(input())
    dp = [0] * (H + 1)
    dp[1] = 1
    for i in range(2, H + 1):
        dp[i] = 1 + 2 * dp[i // 2]
    print(dp[-1])

resolve()

### FIXED CODE ###

def resolve():
    H = int(input())
    def sol(n):
        if n == 1:
            return 1
        return 1 + 2 * sol(n//2)
    print(sol(H))

resolve()
n, k, q = map(int, input().split())
A = [0]*n
for i in range(n):
  a = int(input())
  A[a-1]+=1
for j in range(n):
  if A[j] > q-k :
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

s = input()
if s == 'Sunny':
  print('Cloudy')
elif s == 'Cloudy':
  print("Rainy")
else:
  print('Sunny')
S=input()
S[3]=8
print(S)

### FIXED CODE ###

S=list(input())
S[3]='8'
print(''.join(S))
#タプルを深くしたまま進め、速度アップ？
#初期入力
import sys
input = sys.stdin.readline
S = input().split()
S=S[0]
Q = int(input())
FQ_dic =tuple()
rev =0
for i in range(Q):
    FQ_dic =tuple(input().split())

    if      FQ_dic[0] =="1": #逆転する
                rev +=1
    else:                   #逆転なし  
        if      FQ_dic[1]=="1":     #後ろにつける
            if rev %2 ==0:
                    S = FQ_dic[2] , S
            else:
                    S = S ,FQ_dic[2] 
        else: #                      #前につける
            if rev %2 ==0:
                    S = S , FQ_dic[2]
            else:        
                    S = FQ_dic[2] , S

#深いパックをアンパック
def flatten_list_tuple_range(l):
    for el in l:
        if isinstance(el, (list, tuple, range)):
            yield from flatten_list_tuple_range(el)
        else:
            yield el
S =flatten_list_tuple_range(S)
S=[i for i in S]

#逆転の回数で場合分け
if rev %2 ==0:
    print(*S,sep="")
else:
    print(*S[::-1],sep="")

### FIXED CODE ###

# 初期入力
NN,K = (int(x) for x in input().split())

#K個の和、初項と修項
p =10**9 + 7
seq =[i for i in range(NN+1)] #0-Nまでの数列
ans =[0] *(NN+1)
st =[0]*(NN+1)
fi =[0]*(NN+1)
st[0] =sum(seq[  :K])
fi[0] =sum(seq[-K: ])
ans[0] =fi[0] -st[0] +1
if NN==1 and K==1:
    print(3)
else:
    for i in range(NN -K+1):
        st[i+1] =st[i] +seq[K+i]
        fi[i+1] =fi[i] +seq[-K-i-1]
        ans[i+1] =(fi[i+1] -st[i+1] +1)
    print(sum(ans) %p)
S = input()
N = len(S)
i = list(S)
if i[0:(N-1)//2] == [((N+2)//2):N]:
  print('Yes')
elif:
  print('No')

### FIXED CODE ###

S = input()
N = len(S)
A = (len(S) - 1) // 2
B = (len(S) + 3) // 2
if S[0:A] == S[B - 1:N]:
  print('Yes')
else:
  print('No')
import sys
input = sys.stdin.readline
S = input().strip()
S[3] = "8"
print(S)

### FIXED CODE ###

import sys
input = sys.stdin.readline
S = list(input().strip())
S[3] = "8"
ans = ""
for s in S:
    ans += s
print(ans)
KN = input().split(' ')
K = int(KN[0])
N = int(KN[1])
M = K/2
Al = input().split(' ')
A = []
for home in Al:
  A.append(int(home))
m = 0

m = distance(A[0],A[-1],M,K)

for i in range(N-1):
  m = max(m,distance(A[i],A[i+1],M,L))
print (10-m)

def distance(d1,d2,M,K):
  if d1<=M and d2<=M:
    return abs(d2-d1)
  if d1<=M and d2>=M:
    return d1+(K-d2)
  if d1>=M and d2>=M:
    return abs(d2-d1)

### FIXED CODE ###

KN = input().split(' ')
K = int(KN[0])
N = int(KN[1])
M = K/2
Al = input().split(' ')
A = []

for home in Al:
  A.append(int(home))

m = A[0]+(K-A[-1])
 
for i in range(N-1):
  m = max(m,abs(A[i]-A[i+1]))

print(K-m)
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
print(a)
if a[-m] > 1 / (4 * m):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n = int(input())
tmp, ans = 0, 0

while tmp < n:
    tmp = tmp + 1
    if tmp % 3 != 0 and tmp % 5 != 0:
        ans = ans + tmp
print(ans)
from math import factorial
#a = factorial(n) / factorial(r) / factorial(n - r)

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

def cf(x1,x2):
    cf=[]
    cf.append(1)
    for i in range(2,min(x1,x2)+1):
        if x1 % i == 0 and x2 % i == 0:
            cf.append(i)
    return cf
  
  
C=cf(A, B)
for i in range(len(C)-1):
  for j in range(i+1, len(C)):
    if len(cf(C[i], C[j]))!=1:
      C.remove(C[j])
n=len(C)
print(int(factorial(n) / factorial(2) / factorial(n - 2)))

### FIXED CODE ###

from fractions import gcd
A, B=map(int, input().split())
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i:
        divisors.append(n//i)

  # divisors.sort()
  return divisors

import math

def is_prime(n):
  if n == 1: return False

  for k in range(2, int(math.sqrt(n)) + 1):
    if n % k == 0:
      return False

  return True
ans=0
for x in set(make_divisors(A))&set(make_divisors(B)):
  if is_prime(x):
    ans+=1

#print(set(make_divisors(A))&set(make_divisors(B)))
print(ans+1)
import itertools
N, M, Q = map(int,input().split())
s = [tuple(map(int, input().split())) for i  in range(Q)]
l = list(range(1,M+1))
ans = []
for v in itertools.combinations(l, N):
    new_v = sorted(v)
    count = 0
    for i in range(Q):
        a, b, c, d = s[i]
        if new_v[b-1] - new_v[a-1] == c:
            count += d
    ans.append(count)
print(max(0, max(ans)))


### FIXED CODE ###

import itertools
N, M, Q = map(int,input().split())
s = [tuple(map(int, input().split())) for i  in range(Q)]
l = list(range(1,M+1))
ans = []
for v in itertools.combinations_with_replacement(l, N):
    count = 0
    for i in range(Q):
        a, b, c, d = s[i]
        if v[b-1] - v[a-1] == c:
            count += d
    ans.append(count)
print(max(0, max(ans)))
N = int(input())
L = list(map(int, input().split()))

L.sort()
s = 0

for n in range(N):
    s += L[2*n}

print(s)

### FIXED CODE ###

n = int(input())
list_L = list(map(int, input().split()))
list_L.sort()
sum = 0
for i in range(n):
    sum += list_L[2*i]
print(sum)
N = int(input())
d_list = list(map(int, input().split()))
sum_num = 0
for i in range(N-1):
    for j in range(i+1, N):
        sum_num += d_list[i] * d_list[j]

print(sum_num)

### FIXED CODE ###

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

if (B*2) >= A:
    print(0)
else:
    print(A-(B*2))
n,k=int(input()).split()
a=list(input().split())
a.sort()
if(k!=0):
  print(sum(a[:-k]))
else:
  print(sum(a))

### FIXED CODE ###

n,k=list(map(int,input().strip().split(' ')))
h=list(map(int,input().strip().split(' ')))
h.sort()
if(k!=0): print(sum(h[:-k]))
else: print(sum(h))
def solve():
  H, W, M = map(int, input().split())
  bomb = [[0]*W for _ in range(H)]
  lis_h = [0]*H
  lis_w = [0]*W
  for i in range(M):
    h,w = map(int, input().split())
    h -= 1
    w -= 1
    bomb[h][w] = 1
    lis_h[h] += 1
    lis_w[w] += 1
  ans = 0
  for h in range(H):
    for w in range(W):
      ans = max(ans, lis_h[h]+lis_w[w]-bomb[h][w])
  return ans
print(solve())

### FIXED CODE ###

from collections import defaultdict
def solve():
  H, W, M = map(int, input().split())
  bomb = defaultdict(lambda: 0)
  lis_h = [0]*H
  lis_w = [0]*W
  for _ in range(M):
    h,w = map(int, input().split())
    h -= 1
    w -= 1
    bomb[(h,w)] = 1
    lis_h[h] += 1
    lis_w[w] += 1
  m_h = max(lis_h)
  m_w = max(lis_w)
  m_h_lis = []
  m_w_lis = []
  for i in range(H):
    if lis_h[i]==m_h:
      m_h_lis.append(i)
  for i in range(W):
    if lis_w[i]==m_w:
      m_w_lis.append(i)
  ans = 0
  for h in m_h_lis:
    for w in m_w_lis:
      if bomb[(h,w)]==0:
        return m_h+m_w
  return m_h+m_w-1
print(solve())
from functools import reduce
from operator import mul
from collections import Counter

def prod(arr):
    return reduce(mul, arr, 1)

def fancy(arr, index):
    output = []
    for i, v in enumerate(index):
        if v:
            output.append(arr[i])
    return output

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

N=int(input())
factors = prime_factorize(N)
counter = Counter(factors)
odd_factors = [factor for factor in factors if counter[factor]%2!=0]
even_factors = [factor for factor in factors if counter[factor]%2==0]
N_odd = prod(odd_factors)

selectors = [list(map(bool, map(int, list("{0:b}".format(i).zfill(len(odd_factors)))))) for i in range(1, 2**len(odd_factors))]
even_coeff = prod(even_factors[::2])

combinations = [(prod(fancy(factors, selector))*even_coeff, even_coeff*N_odd//prod(fancy(factors, selector))) for selector in selectors]

distances = [combination[0]-1 + combination[1]-1 for combination in combinations]
print(min(distances))


### FIXED CODE ###

N = int(input())
minstep = 9999999999999999999999999999999
for i in range(1, int(N**0.5+1)):
  if N%i == 0:
    minstep = min(minstep, i+N//i-2)
print(minstep)
N,M = map(int,input().split())
list = [int(i) for i input().split()]

total = 0
for i in range(N):
    if i >= (sum(list) / (4 * M)):
        total = total + 1

if total >= M:
    print("Yes")
else:
    print('No')

### FIXED CODE ###

N,M = map(int,input().split())
A = list(map(int,input().split()))

total = 0
for i in A:
    if i >= (sum(A) / (4 * M)):
        total = total + 1

if total >= M:
    print("Yes")
else:
    print('No')
n, m = map(int, input().split())
a = [[False]*n for i in range(n)]
rootList = [-1] * n

def hasSameRoot(x, y):
    if rootList[x] == rootList[y] != -1:
        return True
    elif rootList[x] == x and rootList[y] == y:
        return False
    elif x > 1:
        return hasSameRoot(y, x-1)
    else:
        return hasSameRoot(x, y-1)


for i in range(m):
    s, t = map(int, input().split())
    if rootList[s] < 0:
        rootList[s] = s
    if rootList[t] < 0:
        rootList[t] = t
    if rootList[s] != rootList[t]:
        rootList[s] = min(rootList[s], rootList[t])
        rootList[t] = min(rootList[s], rootList[t])
q = int(input())
for i in range(q):
    s, t = map(int, input().split()):
    if hasSameRoot(s, t):
        print("yes")
    else:
        print("no")

### FIXED CODE ###

n, m = map(int, input().split())
rootList = [-1 for i in range(n)]
 
def getRoot(x):
    r = rootList[x]
    if r < 0:
        rootList[x] = x
    elif r != x:
        rootList[x] = getRoot(r)
    return rootList[x]
 
 
def setSameRoot(x, y):
    x = getRoot(x)
    y = getRoot(y)
    if x != y:
        rootList[x] = rootList[y] = min(x, y)
 
for i in range(m):
    s, t = map(int, input().split())
    setSameRoot(s, t)
q = int(input())
for i in range(q):
    s, t = map(int, input().split())
    print("yes" if getRoot(s) == getRoot(t) else "no")
N, W = map(int, input().split())
p = []
for it in range(N):
    p.append(list(map(int,input().split())))
    
import numpy as np
dp = np.zeros((N+1,W+1), dtype=np.int64)

i = 0
for w, v in p:
    i += 1
    for w_limit in range(1, W+1):
        if w_limit < w:
            dp[i,w_limit]=dp[i-1,w_limit]
            continue
        if (dp[i-1, w_limit-w] + v) > dp[i-1, w_limit]:
            dp[i, w_limit] = dp[i-1, w_limit-w] + v
        else:
            dp[i,w_limit]=dp[i-1,w_limit]
print(dp.max())

### FIXED CODE ###

N, W = map(int, input().split())
p = []
for it in range(N):
    p.append(list(map(int,input().split())))
    
dp = [[0 for i in range(W+1)] for j in range(N+1)]
i = 0
for w, v in p:
    i += 1
    for w_limit in range(1, W+1):
        if w_limit < w:
            dp[i][w_limit]=dp[i-1][w_limit]
            continue
        if (dp[i-1][w_limit-w] + v) > dp[i-1][w_limit]:
            dp[i][w_limit] = dp[i-1][w_limit-w] + v
        else:
            dp[i][w_limit]=dp[i-1][w_limit]
print(max(max(dp)))
n = int(input())
for i in range(n-1, -1, -1):
    if h_list[i]>h_list[i-1]:
        h_list[i-1] -= 1
        if h_list[i] < h_list[i-1]:
            print('No')
            break
else:
    print('Yes')

### FIXED CODE ###

n=int(input())
arr=list(map(int,input().split()))
for i in range(n-2,-1,-1):
  if arr[i]>arr[i+1]:
    arr[i]-=1
    if arr[i]>arr[i+1]:
      print('No')
      break
else:
  print('Yes')
N=int(input())
a,b,c,d=0,0,0,0
for i in range(N):
  A=input()
  if A=="AC":
    a+=1
  elif A=="WA":
    b+=1
  elif A=="TLE":
    c+=1
  else:
    d+=1
print("AC x" a)
print("WA x" b)
print("TLE x" c)
print("RE x" d)

### FIXED CODE ###

N=int(input())
a,b,c,d=0,0,0,0
for i in range(N):
  A=input()
  if A=="AC":
    a+=1
  elif A=="WA":
    b+=1
  elif A=="TLE":
    c+=1
  else:
    d+=1
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)
n,k = map(int,input().split()) #入力
a = list(map(int,input().split())) #使用不可の数字
n2 = [int(i) for i in list(str(n))] #価格を分解
for i in n2:
    while n2[i] in a :#使用不可ならば
        n2[i] += 1
        if n2[i]>=10:
            n2[i] =1

print("".join([str(i) for i in n2]))

### FIXED CODE ###

n,k = map(int,input().split()) #入力
a = list(map(int,input().split())) #使用不可の数字
b = {0,1,2,3,4,5,6,7,8,9}-set(a) #使用可能な数字の集合
while set([int(i) for i in list(str(n))])-b !=set() : # 使用可能な数字のみでなければ
    n += 1
print(n)
N = int(input())
T, A= map(int, input().split())
H = list(map(int, input().split()))
dH =[]
for i in H:
    dH.append(abs(A - T + 0.006 * i))
print(dH.index(min(dH) + 1))

### FIXED CODE ###

X, Y = map(int, input().split())
print(X + Y // 2)
X, A = int(input())

if X < A:
    print(0)
else:
    print(10)

### FIXED CODE ###

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

if X < A:
    print(0)
else:
    print(10)
n, k = map(int, input().split())
l = list(map(float, input().split()))
m = max(l)
def hcf(x, y): 
    while(y): 
        x, y = y, x % y 
    return x 
num1=l[0] 
num2=l[1] 
gcd=hcf(num1,num2) 
for i in range(2,len(l)): 
    gcd=hcf(gcd,l[i])
if k%gcd == 0 and k<=m:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")


### FIXED CODE ###

import math
from functools import reduce
n, k = list(map(int, input().split()))
A = list(map(int, input().split()))
def hcf(l):
    return reduce(math.gcd, l)
gcd = hcf(A)
m = max(A)
if k%gcd == 0 and k<=m:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
A,B = map(int,input().split())
K = 0
if (A+B)%2 == 0:
  K = (A+B) /2
else:
  K = 'IMPOSSIBLE'
  
print(int(K))


### FIXED CODE ###

A,B = map(int,input().split())
K = 0
if (A+B)%2 == 0:
  K = int((A+B) /2)
else:
  K = 'IMPOSSIBLE'
  
print(K)
import sys


def resolve():
    read = sys.stdin.read

    s, t = read().split('\n')
    
    # 配るDP
    # dp[i + 1][j + 1]はsのi文字目までとtのj文字目までのLCSの長さ
    # LCS=最長共通部分列問題
    dp = [[0] * (len(t) + 1) for _ in [0] * (len(s) + 1)]
    
    for i in range(len(s)):
        for j in range(len(t)):
            if s[i] == t[j]:
                dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j] + 1)
            dp[i + 1][j + 1] = max(dp[i + 1][j + 1],
                                   dp[i + 1][j],
                                   dp[i][j + 1])

    # LCSを求めたDPから部分文字列を復元
    res = ''
    i, j = len(s), len(t)
    while i > 0 and j > 0:
        if dp[i][j] == dp[i - 1][j]:
            i -= 1
        elif dp[i][j] == dp[i][j - 1]:
            j -= 1
        else:
            res += s[i - 1]
            i -= 1
            j -= 1
    print(res[::-1])


resolve()


### FIXED CODE ###

def resolve():
    import sys
    def max2(a: int, b: int):
        """
        入力された2つの整数a,bの大きいほうを返す
        Parameters
        ----------
        a, b : int
            比較したい整数
        Returns
        -------
        a or b : int
            大きいほうの整数
        """
        if a >= b:
            return a
        else:
            return b
    
    readline = sys.stdin.readline
 
    s = readline()
    t = readline()
 
    # 配るDP
    # dp[i + 1][j + 1]はsのi文字目までとtのj文字目までのLCSの長さ
    # LCS=最長共通部分列問題
    dp = [[0] * (len(t) + 1) for _ in [0] * (len(s) + 1)]
 
    for i in range(len(s)):
        for j in range(len(t)):
            if s[i] == t[j]:
                dp[i + 1][j + 1] = max2(dp[i + 1][j + 1], dp[i][j] + 1)
            dp[i + 1][j + 1] = max2(dp[i + 1][j + 1], dp[i + 1][j])
            dp[i + 1][j + 1] = max2(dp[i + 1][j + 1], dp[i][j + 1])
 
    # LCSを求めたDPから部分文字列を復元
    res = []
    i, j = len(s), len(t)
    while i > 0 and j > 0:
        if dp[i][j] == dp[i - 1][j]:
            i -= 1
        elif dp[i][j] == dp[i][j - 1]:
            j -= 1
        else:
            res.append(s[i - 1])
            i -= 1
            j -= 1
    print(''.join(res[::-1]))
 
 
resolve()
#n, m, k = map(int, input().split())
#a = list(map(int, input().split()))
#b = list(map(int, input().split()))


time = 0
ans = 0
a_next = a.pop(0)
b_next = b.pop(0)

while True:
        
    if a_next <= b_next:
        time += a_next
        try:
            a_next = a.pop(0)
        except:
            a_next = 200001
    
    else:
        time += b_next
        try:
            b_next = b.pop(0)
        except:
            b_next = 200001
    
    if time <= k:
        ans += 1
    else:
        break

print(ans)

### FIXED CODE ###

n, m, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

A_cumsum, B_cumsum = [0], [0]

for i in range(n):
    A_cumsum.append(A_cumsum[i] + A[i])
    
for j in range(m):
    B_cumsum.append(B_cumsum[j] + B[j])
    
ans, j = 0, m

for i in range(n + 1): # 0を最初に代入した分
    if A_cumsum[i] > k:
        break
    while A_cumsum[i] + B_cumsum[j] > k:
        j -= 1
    ans = max(ans, i + j)

print(ans)
a = int(input())
b = int(input())
c = int(input())
x = int(input())

count = 0

for h in range(a +1):
    for i in range(b +1):
        for j in range(c +1):
            if total = a *500 + b *100 + c *50 == x:
                count += 1
print(count)

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
x = int(input())

count = 0

for h in range(a +1):
    for i in range(b +1):
        for j in range(c +1):
            if h *500 + i *100 + j *50 == x:
                count += 1
print(count)
n = int(input())
ans = 1
A = list(map(int,input().split()))
for x in A:
  if x == 0:
    print(0)
    exit(0)
  ans *= x
  if ans > 10**18:
    print(-1)
    exit(0)
print(ans)


### FIXED CODE ###

a,b = map(int,input().split())
print(a*b)
N,H = map(int,input().split())
Ma = 1
B = []
for i in range(N):
    a,b = map(int,input().split())
    B.append(b)
    if a > Ma:
        Ma = a
B.sort()
B.reverse()
C = 0
i = 0
while i < len(B) and B[i] > Ma:
  i += 1
H -= sum(B[:i])
print(i+int(-(-H//Ma)))

### FIXED CODE ###

N = int(input())
a = [int(n) for n in input().split()]
print(sum(a)-N)
[N,M] = [int(s) for s in input().rstrip().split(" ")
if N - M == 0:
	print("Yes")
else:
    print("No")

### FIXED CODE ###

[N,M] = [int(s) for s in input().rstrip().split(" ")]
if N == M:
  print("Yes")
else:
  print("No")
N_K=input()
pn=input()
list_pn=[]
for i in range(len(N_K)):
    if N_K[i]==" ":
        N =int(N_K[0:i])
        K =int(N_K[i+1:len(N_K)])
a =0
for i in range(len(pn)):
    if pn[i]==" ":
        list_pn.append(int(pn[a:i]))
        a = i
list_pn.append(int(pn[a+1:len(pn)]))
pn_ave=[]
for i in range(N):
    ave =0
    for j in range(list_pn[i]):
        ave += j+1
    pn_ave.append(ave/list_pn[i])
pn_ave_total=[]
total = 0
A = 0
for i in range(N-K+1):        
    while A<K:
        total+=pn_ave[A]
        A += 1
    A = A-2
    K += 1
    pn_ave_total.append(total)
    total=0
pn_ave_total.sort()
print(pn_ave_total[-1])

### FIXED CODE ###

N,K=map(int,input().split())
list_pn=list(map(int,input().split()))
# Pnの期待値を計算
pn_ave=[]
for i in range(N):
    pn_ave.append((list_pn[i]+1)/2)
# Sj+k-Sjの累積和を用いて考える
Sj = []
Sj.append(0)
S=0
for i in range(N):
    S += pn_ave[i]
    Sj.append(S)
# print(Sj)
Sk = []
for i in range(N-K+1):
    Sk.append(Sj[i+K]-Sj[i])
# print(Sk)
Sk.sort()
print(Sk[-1])
import math

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


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

print(lcm(a, b))

### FIXED CODE ###

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

input = sys.stdin.readline
import fractions



def main():
    N=int(input())
    A = [int(x) for x in input().split()]
    MOD=10**9+7
    
    x = 1
    for a in A:
        x = (a *x )// fractions.gcd(a, x)

    ans=0
    for a in A:
      ans+=x//a

    print(ans%mod)

if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    from fractions import gcd
    import sys
    n=int(input())
    a = tuple(map(int, input().split()))
    ans = 1

    mmm=10**9+7
    for i in a:
        ans = ans *i // gcd(ans, i)

    result=0
    for item in a:
      result+=ans//item

    print(result%mmm)

if __name__ == '__main__':
    main()
import numpy as np
#かけて最小公倍数になる　そのために必要な数がB
from math import gcd
N=int(input())
mod=10**9+7
A=list(map(int, input().split()))
def lcm(a,b):
  return (a*b)/gcd(a,b)

LCM=lcm(A[0],A[1])
#LCM%=mod
for i in range(2,N):
  LCM=lcm(LCM, A[i])
  #LCM%=mod
  
#print(LCM)
ans=0
for a in A:
  ans+=LCM//a
  ans%=mod

print(int(ans%mod))



### FIXED CODE ###


#かけて最小公倍数になる　そのために必要な数がB
from fractions import gcd
N=int(input())
if N==1:
  print(1)
  exit()

mod=10**9+7
A=list(map(int, input().split()))
def lcm(a,b):
  return a//gcd(a,b)*b

if N==2:
  LCM=lcm(A[0],A[1])
  ans=((LCM//A[0])+(LCM//A[1]))%mod
  print(ans)
  exit()

LCM=1
#LCM%=mod
for a in A:
  LCM=lcm(LCM, a)
  #LCM%=mod
  
#print(LCM)
ans=0
for a in A:
  ans+=LCM//a
  #ans%=mod

print(int(ans%mod))
r = (float)input()
pi = 3.141592
s = pi * r * r
l = 2.0 * pi * r

print s, l

### FIXED CODE ###

import math

r = float(input())

s = math.pi * r**2
l = 2.0*math.pi*r

print(s, l)
#ABC044.A
N,K,X,Y = map(int,input().split())
#N<=Kの時
if N <= K:
    total_1 = N*X
    print(total_1)
#N>Kの時
else:
    total_2 = K*X + (N-K)*Y
    print(total_2)

### FIXED CODE ###

n = int(input())
k=int(input())
x = int(input())
y = int(input())

if n>k:
  total = k*x +(n-k)*y
  print(total)
else:
  total=n*x
  print(total)
n, k = map(int, input().split())

N = [abs(n - i*k) for i in range(n)]
ans = min(N)
print(ans)
        

### FIXED CODE ###

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

m = n % k
m1 = k - m

if m > m1:
  ans = m1
else:
  ans = m
print(ans)
X,A,B = map(int,input().split())
print((X - A)%B)

### FIXED CODE ###

x = int(input())
a = int(input())
b = int(input())
print((x-a)%b)