Harryxun/stf_run huggingface dataset:
n = input()
for i in n:
    a = list(map(int,input().split()))
a.sort(reverse = True)
print(sum(a[0::2]) - sum(a[1::2]))



### FIXED CODE ###

input()
a = list(map(int,input().split()))
a.sort(reverse = True)
print(sum(a[0::2]) - sum(a[1::2]))
N, Q = map(int, input().split())

edge = [[] for i in range(N)]
child = [{i} for i in range(N)]
ans = [0] * N 

for i in range(N-1):
    a, b = map(int, input().split())
    edge[a-1].append(b-1)
    edge[b-1].append(a-1)

is_visited = [False] * N

def dfs(cur):
    is_visited[cur] = True

    for next in edge[cur]:
        if is_visited[next]:
            continue
        dfs(next)
        child[cur] = child[next] | child[cur]

dfs(0)

for q in range(Q):
    p, x = map(int, input().split())
    for c in child[p-1]:
        ans[c] += x

print(*ans)

### FIXED CODE ###

N, Q = map(int, input().split())

edge = [[] for i in range(N)]
ans = [0] * N
query = [0] * N

for i in range(N-1):
    a, b = map(int, input().split())
    edge[a-1].append(b-1)
    edge[b-1].append(a-1)

for q in range(Q):
    p, x = map(int, input().split())
    query[p-1] += x

is_visited = [False] * N
stack = [(0,0)]

while len(stack) != 0:
    cur, q = stack.pop()
    is_visited[cur] = True

    q = q + query[cur]
    ans[cur] += q

    for next in edge[cur]:
        if is_visited[next]:
            continue
        stack.append((next, q))

print(*ans)
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()
c0, c1, c2, c3 = 0,0,0,0
for i in range(N):
    if S() == "AC":
        c0 += 1
    elif S() == "WA":
        c1 += 1
    elif S() == "TLE":
        c2 += 1
    elif S() == "RE":
        c3 += 1

print("AC x " + c0)
print("WA x " + c1)
print("TLE x " + c2)
print("RE x " + c3)

### FIXED CODE ###

from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()
c0, c1, c2, c3 = 0,0,0,0
for i in range(N):
    s = S()
    if s == "AC":
        c0 += 1
    elif s == "WA":
        c1 += 1
    elif s == "TLE":
        c2 += 1
    elif s == "RE":
        c3 += 1

print("AC x " + str(c0))
print("WA x " + str(c1))
print("TLE x " + str(c2))
print("RE x " + str(c3))
rom math import gcd

k = int(input())
total = 0
for a in range(1, k+1):
    t = gcd(a, b)
    for b in range(1, k+1):
        for c in range(1, k+1):
            # print(a, b, c, gcd(a, gcd(b, c)))
            total += gcd(t, c)
print(total) # sample_02 1982 ms


### FIXED CODE ###

# ABC162C

from fractions import gcd
from math import gcd

k = int(input())
total = 0
for a in range(1, k+1):
    for b in range(1, k+1):
        for c in range(1, k+1):
            # print(a, b, c, gcd(a, gcd(b, c)))
            total += gcd(a, gcd(b, c))
print(total)
n = int(input())
x = input()
xx = int(x, 2)
value = [0, 1]
count_1 = x.count('1')
for i in range(2, 2 * (10 ** 5) + 1):
    ans = 1
    i = i % bin(i).count('1')
    value.append(ans + value[i])

for i in range(n):
    print(xx)

### FIXED CODE ###

n = int(input())
x = input()
count_1 = x.count('1')
value = [0, 0]
x_int = int(x, 2)
value[0] = x_int % (count_1 - 1) if count_1 > 1 else 0
value[1] = x_int % (count_1 + 1)
for i in range(n):
    if x[i] == '0':
        tmp = (pow(2, n - i - 1, count_1 + 1) + value[1]) % (count_1 + 1)
    else:
        if count_1 == 1:
            print(0)
            continue
        tmp = (-pow(2, n - i - 1, count_1 - 1) + value[0]) % (count_1 - 1)
    ans = 1
    while tmp > 0:
        tmp = tmp % (bin(tmp).count('1'))
        ans += 1
    print(ans)
N=int(input())
X=input()
a=int(X,2)

def popcount(x):
  return bin(x).count("1")
p=X.count('1')
pl=a%(p+1)
if popcount!=1:
  mi=a%(p-1)

def f(x):
  if x==0:
    return 1
  else:
    return f(x%popcount(x))+1

for i in range(N):
  if X[i]=='0':
    b=pl
    b+=pow(2,N-i-1,p+1)
    b%=p+1
  else:
    if popcount(a)!=1:
      b=mi
      b-=pow(2,N-i-1,p-1)
      b%=p-1
    else:
      print(0)
      continue
  print(f(b))

### FIXED CODE ###

N=int(input())
X=input()
a=int(X,2)

def popcount(x):
  return bin(x).count("1")
p=X.count('1')

pl=a%(p+1)
if p!=1:
  mi=a%(p-1)

def f(x):
  if x==0:
    return 1
  else:
    return f(x%popcount(x))+1

for i in range(N):
  if X[i]=='0':
    b=pl
    b+=pow(2,N-i-1,p+1)
    b%=p+1
  else:
    if p!=1:
      b=mi
      b-=pow(2,N-i-1,p-1)
      b%=p-1
    else:
      print(0)
      continue
  print(f(b))
import math

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

    return ans

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

print(lcm(A, B))

### FIXED CODE ###

import fractions

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

    return ans

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

print(lcm(A, B))
N = int(input())
E = [[] for _ in range(N)]
for i in range(N-1):
    a,b = map(int,input().split())
    a,b = a-1,b-1
    E[a].append([b,i])
 
ans = [None]*(N-1)
 
def paint(now,color):
    No = 1
    for (to, en) in E[now]:
        if No == color:
            No += 1
        ans[en] = No
        paint(to,No)
        No += 1
 
paint(0,0)
print(max(ans))
print(*ans, sep="\n")

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**9)

N=int(input())
E=[[] for _ in range(N)]
for i in range(N-1):
  a,b = map(int, input().split())
  E[a-1].append((b-1,i))
ans=[[] for _ in range(N-1)]
def sub(p, n):
  m=1
  for b,i in E[p]:
    if m == n: m+=1
    ans[i]=m
    sub(b,m)
    m+=1
sub(0,0)
print(max(ans))
for a in ans:
  print(a)
a, b = [int(x) for x in input().split()]
k = int(input())
found = False
for i in range(a, b + 1):
    if i % k == 0:
        found = True
if found: 
    print("YES")
else:
    print("NO")
    

### FIXED CODE ###

k = int(input())
a, b = [int(x) for x in input().split()]
found = False
for i in range(a, b + 1):
    if i % k == 0:
        found = True
if found:
    print("OK")
else:
    print("NG")
import sys
n = int(input())
D = list(map(int, input().split()))
m = int(input())
T = list(map(int, input().split()))

max_diff = max(D)
difficulty = [0] * (max_diff + 1)
for d in D:
    difficulty[d] += 1

for t in T:
    if t > max_diff:
        print('NO')
        sys.exit()
    difficulty[t] -= 1
    if difficulty[t] < 0:
        print('NO')
        sys.exit()
print('YES')


### FIXED CODE ###

import sys
n = int(input())
D = list(map(int, input().split()))
m = int(input())
T = list(map(int, input().split()))

max_diff = max(D)
difficulty = {}
for d in D:
    try:
        difficulty[d] += 1
    except:
        difficulty[d] = 1

for t in T:
    try:
        difficulty[t] -= 1
    except:
        print('NO')
        sys.exit()
    if difficulty[t] < 0:
        print('NO')
        sys.exit()
print('YES')
import collections

s = input()
k = int(input())
b = collections.Counter(s)
c = sorted(b.items())
con = []
n = 0
while True:
    con.append(c[n][0])
    if len(con) == k:
        break
    for i in range(len(c)):
        check = c[n][0] + c[i][0]
        if check in s:
            con.append(check)
            if len(con) >= k:
                break
            for i_2 in range(len(c)):
                check_2 = check + c[i_2][0]
                if check_2 in s:
                    con.append(check_2)
                    if len(con) >= k:
                        break
                    for i_3 in range(len(c)):
                        check_3 = check_2 + c[i_3][0]
                        if check_3 in s:
                            con.append(check_3)
                            if len(con) >= k:
                                break
                            for i_4 in range(len(c)):
                                check_4 = check_3 + c[i_4][0]
                                if check_4 in s:
                                    con.append(check_4)
                                    if len(con) >= k:
                                        break
                                    break
                                break
                            break
                        break
                    break
                break
            break
        break
    n +=1
print(con[k-1])

### FIXED CODE ###

import collections

s = input()
k = int(input())
b = collections.Counter(s)
c = sorted(b.items())
con = []
n = 0
while True:
    con.append(c[n][0])
    if len(con) == k:
        break
    for i in range(len(c)):
        check = c[n][0] + c[i][0]
        if check in s:
            con.append(check)
            if len(con) >= k:
                break
            for i_2 in range(len(c)):
                check_2 = check + c[i_2][0]
                if check_2 in s:
                    con.append(check_2)
                    if len(con) >= k:
                        break
                    for i_3 in range(len(c)):
                        check_3 = check_2 + c[i_3][0]
                        if check_3 in s:
                            con.append(check_3)
                            if len(con) >= k:
                                break
                            for i_4 in range(len(c)):
                                check_4 = check_3 + c[i_4][0]
                                if check_4 in s:
                                    con.append(check_4)
                                    if len(con) >= k:
                                        break
    if len(con) >= k:
        break                              
    n +=1
print(con[k-1])
a = int(input())
b = int(input())
x = (a+b)//2 + 1
print(x)

### FIXED CODE ###

a,b=map(int,input().split())
print((a+b+1)//2)
import sys
N, M = map(int, input().split())

SClis = [] 
for _ in range(M):
    a, b = map(int, input().split())
    SClis.append([a,b])

ans = [-1]*N


for singlelis in SClis:
    digits = singlelis[0]-1
    number = singlelis[1]

    if ans[digits] == -1 or ans[digits] == number:
        ans[digits] = number
    else:
        print(-1)
        sys.exit()

if ans[0] == 0:
    print(-1)
    sys.exit()


kotae = ""
for i in range(N):
    i_str = str(ans[i])

    if i == 0 and i_str == "-1":
        kotae = kotae + "1"
        

    if i_str == "-1" and i != 0:
        kotae = kotae + "0"
    elif i_str != "-1" and i != 0:
        kotae = kotae + i_str

print(int(kotae))
     



### FIXED CODE ###

import sys
N, M = map(int, input().split())

#とりまぶっこむ 
SClis = [] 
for _ in range(M):
    a, b = map(int, input().split())
    SClis.append([a,b])

ans = [-1]*N

for i in range(M):
    singlelis = SClis[i]
    S =  (singlelis[0] - 1)
    C =  (singlelis[1])
    
    if ans[S] != -1 and ans[S] != C:
        print(-1)
        sys.exit()
    else:
        ans[S] = C


    
if N == 1:
    if ans[0] == -1:
        ans[0] = 0
        print(''.join(map(str, ans)))
        sys.exit()

if N != 1:
    if ans[0] == 0:
        print(-1)
        sys.exit()
    
    if ans[0] == -1:
        ans[0] = 1
    
    for i in range(1,N):
        if ans[i] == -1:
            ans[i] = 0

print(''.join(map(str, ans)))
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
minute=0
ans=0
while True:
    if A[0] > K and B[0] > K:
        break
    elif not A and not B:
        break
    elif not A:
        x=B[0]
        del B[0]
    elif not B:
        x=A[0]
        del A[0]
    elif A[0]!=B[0]:
        x=min(A[0],B[0])
        if A[0]<B[0]:
            del A[0]
        else:
            del B[0]
    else:
        x=A[0]
        while True:
            i=1
            if A[i]<B[i]:
                del A[0]
                break
            elif B[i]<A[i]:
                del B[0]
                break
            else:
                i+=1
    minute += x
    if minute > K:
        break
    ans += 1

print(ans)

### FIXED CODE ###

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

a,b = [0],[0]
for i in range(N):
    a.append(a[i]+A[i])
for i in range(M):
    b.append(b[i]+B[i])

ans,j = 0,M
for i in range(N+1):
    if a[i]>K:
        break
    while b[j]>K-a[i]:
        j -= 1
    ans = max(ans,i+j)
print(ans)
a,b = map(int,input().split())
print(int(a*b))

### FIXED CODE ###

import math
import decimal
a,b = map(decimal.Decimal,input().split())
ans = a*b
print(math.floor(ans))
import sys
def mincost(n,h,i,dp):
    if i==(n-1):
        return 0
    elif i==(n-2):
        return abs(h[n-1]-h[i])
    mncost=sys.maxsize
    for j in range(i+1,i+3):
        if dp[j]==-1:
            cost=mincost(n,h,j,dp)
            dp[j]=cost
        else:
            cost=dp[j]
        mncost=min(mncost,cost+abs(h[j]-h[i]))
    return mncost

n=int(input())
h=[int(x) for x in input().split()]
dp=[-1 for i in range(n)]
print(mincost(n,h,0,dp))

### FIXED CODE ###

import sys
def mincost(n,h):
    dp=[-1 for i in range(n)]
    dp[n-1]=0
    dp[n-2]=abs(h[n-2]-h[n-1])
    for i in range(n-3,-1,-1):
        dp[i]=min(dp[i+1]+abs(h[i+1]-h[i]),dp[i+2]+abs(h[i+2]-h[i]))
    return dp[0]    

n=int(input())
h=[int(x) for x in input().split()]
print(mincost(n,h))
A, B = map(int,input().split())
cost = list()
m = B + 1
for i in range(A):
  x, y = map(int, input().split())
  if y < min:
    m = y
    cost.append(x)
print(min(cost) if m <= B else 'TLE')

### FIXED CODE ###

A, B = map(int,input().split())
cost = list()
m = B + 1
for i in range(A):
  x, y = map(int, input().split())
  if y < m:
    cost.append(x)
print(min(cost) if len(cost) != 0 else 'TLE')
n=int(input())
a = [int(i) for i in input().split()] 
A=0
B=0
C=0
k=0
for i in range(n):
  if i%2==0:
    k=max(a)
    A += k
    del a(a.index(k)
  else :
    k=max(a)      
    B += k
    del a(a.index(k)      
  
C=A-B          
print(C)          

### FIXED CODE ###

n=int(input())
a = [int(i) for i in input().split()] 
A=0
B=0
C=0
k=0
for i in range(n):
  if i%2==0:
    k=max(a)
    A += k
    del a[a.index(k)]
  else :
    k=max(a)      
    B += k
    del a[a.index(k)]   
  
C=A-B          
print(C)
N,M=map(int,input().split())
sc=[list(map(int,input().split())) for i in range(M)]
s=[sc[i][0] for i in range(M)]
c=[sc[i][1] for i in range(M)]
sc.sort()
sets=list(set(s))
setc=list(set(c))
if len(sets)!=len(setc):
    ans=-1
if len(setc)==1 and setc[0]==0:
    ans=0
elif sc[0][0]==1 and sc[0][1]==0:
    ans=-1
else:
    if len(sets)==3:
        ans=sc[0][1]*100+sc[1][1]*10+sc[2][1]
    elif len(sets)==2:
        if len(sc)==3:
            sc=[sc[0],sc[2]]
        if sc[0][0]==1:
            if sc[1][0]==2:
                ans=sc[0][1]*100+sc[1][1]*10
            if sc[1][0]==3:
                ans=sc[0][1]*100+sc[1][1]
        if sc[0][0]==2:
            ans=100+sc[0][0]*10+sc[0][1]
    elif len(sets)==1:
        if sc[0][0]==1:
            if N==1:
                ans=sc[0][1]
            if N==2:
                ans=sc[0][1]*10
            if N==3:
                ans=sc[0][1]*100
        if sc[0][0]==2:
            if N==1:
                ans=-1
            if N==2:
                ans=sc[0][1]*10
            if N==3:
                ans=100+sc[0][1]*10
        if sc[0][0]==3:
            if N==1:
                ans=-1
            if N==2:
                ans=-1
            if N==3:
                ans=sc[0][1]*100
if len(str(ans))==N:
    print(ans)
else:
    print(-1)

### FIXED CODE ###

N,M=map(int,input().split())
sc=[list(map(int,input().split())) for i in range(M)]
s=[sc[i][0] for i in range(M)]
c=[sc[i][1] for i in range(M)]

for i in range(1000):
    if len(str(i)) == N:
        for j in range(M):
            if str(i)[s[j]-1] != str(c[j]):
                break
        else:
            print(i)
            break
else:
    print(-1)
A,B,C = map(int,input(),split())
if C>=A and C<=B:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a,b,c = map(int,input().split())
if c>=a:
  if b>=c:
    print("Yes")
  else:
    print("No")
else:
  print("No")
while True:
    x,y = map(int,input().split())
    if x > y:
        print(f"{y} {x}")
    elif x < y:
        print(f"{x} {y}")
    elif x == y:
        print(f"{x} {y}")
    elif x == 0 and y == 0:
        break


### FIXED CODE ###

while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        print(f"{y} {x}")
    elif x <= y:
        print(f"{x} {y}")
# 200322 A

nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]
    
if __name__ == "__main__":
    N,M = list(map(int,input().split()))
    print(cmb(N,2)+cmb(M,2))



        
    


### FIXED CODE ###

# 200322 A

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

if __name__ == "__main__":
    N,M = list(map(int,input().split()))
    
    if N <= 1:
        Nc = 0
    else:
        Nc = cmb(N,2)
    
    if M < 2:
        Mc = 0
    else:
        Mc = cmb(M,2)
    print(Nc + Mc)
import heapq

n, m = map(int, input().split())
a = list(map(int, input().split()))
heapq.heapify(a)

for i in range(m):
    b , c = map(int,input().split())
    for j in range(b):
        p = heapq.heappop(a)
        if p >= c:
            heapq.heappush(a,p)
            break
        else:
            heapq.heappush(a,c)

print(sum(a))

### FIXED CODE ###

a , b = map(int,input().split())
if a >= 13:
    print(b)
elif 6 <= a <= 12:
    print(b//2)
else:
    print(0)
H, W = list(map(int, input().split()))
A = [input() for _ in range(H)]
b = "#"
w = "."

wc = 0
L = []
wb = [[0] * W for _ in range(H)]
for i in range(H):
  for j in range(W):
    if A[i][j] == w:
      wc += 1
    else:
      L.append([i, j])
      wb[i][j] = 1

Ans = 0
while wc > 0:
  L2 = []
  Ans += 1
  for ki, kj in L:
    if ki - 1 >= 0:
      if wb[ki - 1][kj] == 0:
        wb[ki - 1][kj] = 1
        wc -= 1
        L2.append([ki - 1 , kj])
    if ki + 1 < W:
      if wb[ki + 1][kj] == 0:
        wb[ki + 1][kj] = 1
        wc -= 1
        L2.append([ki + 1 , kj])
    if kj - 1 >= 0:
      if wb[ki][kj - 1] == 0:
        wb[ki][kj - 1] = 1
        wc -= 1
        L2.append([ki, kj - 1])
    if kj + 1 < H:
      if wb[ki][kj + 1] == 0:
        wb[ki][kj + 1] = 1
        wc -= 1
        L2.append([ki, kj + 1])
  L = L2
print(Ans)

### FIXED CODE ###

H, W = list(map(int, input().split()))
A = [input() for _ in range(H)]
b = "#"
w = "."

wc = 0
L = []
wb = [[0] * W for _ in range(H)]
for i in range(H):
  for j in range(W):
    if A[i][j] == w:
      wc += 1
    else:
      L.append([i, j])
      wb[i][j] = 1

Ans = 0
while wc > 0:
  L2 = []
  Ans += 1
  for ki, kj in L:
    if ki - 1 >= 0:
      if wb[ki - 1][kj] == 0:
        wb[ki - 1][kj] = 1
        wc -= 1
        L2.append([ki - 1 , kj])
    if ki + 1 < H:
      if wb[ki + 1][kj] == 0:
        wb[ki + 1][kj] = 1
        wc -= 1
        L2.append([ki + 1 , kj])
    if kj - 1 >= 0:
      if wb[ki][kj - 1] == 0:
        wb[ki][kj - 1] = 1
        wc -= 1
        L2.append([ki, kj - 1])
    if kj + 1 < W:
      if wb[ki][kj + 1] == 0:
        wb[ki][kj + 1] = 1
        wc -= 1
        L2.append([ki, kj + 1])
  L = L2
print(Ans)
import bisect

def main():
    N = int(input())
    CSF = tuple(tuple(map(int, input().split())) for _ in [0] * (N - 1))

    start = [[] for _ in [0] * N]
    arrival = 50000
    for i, (c, s, f) in enumerate(CSF):
        start[i] = [j for j in range(s, arrival, f)]

    for i in range(N - 1):
        sec = 0
        for j in range(i, N - 1):
            n = bisect.bisect_left(start[j], sec)
            sec = start[j][n] + CSF[j][0]
        print(sec)
    print(0)

main()


### FIXED CODE ###

def main():
    N = int(input())
    C, S, F = [], [], []
    capnd, sapnd, fapnd = C.append, S.append, F.append
    for c, s, f in (map(int, input().split()) for _ in [0] * (N - 1)):
        capnd(c)
        sapnd(s)
        fapnd(f)

    for i in range(N):
        t = 0
        for j in range(i, N - 1):
            if t < S[j]:
                t = S[j]
            elif not t % F[j]:
                pass
            else:
                t = t + F[j] - t % F[j]
            t += C[j]
        print(t)

main()
string = input()
i = 1
ans = "
for s in string:
  if i % 2 != 0:
    ans += s

print(ans)

### FIXED CODE ###

string = input()
i = 1
ans = ""
for s in string:
  if i % 2 != 0:
    ans += s
  i += 1
 
print(ans)
#16D8101023J 久保田凌弥 kubotarouxxx python3

x=int(input())
y=int(input())

w=x*y
z=2*x+2*y

print(w)
print(z)


### FIXED CODE ###

#16D8101023J 久保田凌弥 kubotarouxxx python3

x,y=map(int, input().split())
w=x*y
z=2*x+2*y

print(w,z)

#
import sys
input = sys.stdin.readline
import math
import numpy as np
def lcm(a, b):
    g = math.gcd(a, b)
    c = a * b
    return c // g
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    print(lcm(A, B))
if __name__ == '__main__':
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)


### FIXED CODE ###

import sys
input = sys.stdin.readline
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    print(A * B // gcd(A, B))
if __name__ == '__main__':
    # test
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)
N = int(input())
H = np.array(map(int, input().split()))
H = list(H)
tmp=[]
for i in range(len(H)-1, -1, -1):
    tmp.append(all([all(H[:i]<=[H[i]]), all([H[i]]<=H[i+1:])]))
print(sum(tmp))

### FIXED CODE ###

import numpy as np
N = int(input())
H = np.array(list(map(int, input().split())))
tmp = []
for i in range(1, len(H)):
    tmp.append(all(H[:i]<=H[i]))
print(sum(tmp)+1)
import math
from functools import reduce
 
 
def gcd_list(numbers):
	return reduce(math.gcd, numbers)
 
 
n = int(input())
a = list(map(int,input().split()))
gcds = []
for i in range(n):
	b = []
	for k in range(n):
		if (i != k):
			b.append(a[k])
	gcds.append(gcd_list(b))
 
print (max(gcds))

### FIXED CODE ###

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


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

l = [0]*(n+2) # l(i) = A1, A2, ..., A(i-1)のgcd
r = [0]*(n+2) # r(i) = Ai, A(i+1), ..., A(n)のgcd

for i in range(n):
	l[i+1] = gcd(l[i],a[i])
for i in reversed(range(n)):
	r[i] = gcd(r[i+1],a[i])

ext = [0] * n
for i in range(n):
	ext[i] = gcd(l[i],r[i+1])

print (max(ext))
print('YES' if input() in '753' else 'NO')i

### FIXED CODE ###

x = input()
print('YES' if x in '753' else 'NO')