Harryxun/stf_run huggingface dataset:
import numpy as np
n, m = map(int, input().split())
road = [0]*n
a = [0]*m
a = np.array(a)
b = [0]*m
b = np.array(b)
for i in range(m):
  x, y = input().split()
  a[i] = (int(x))
  b[i] = (int(y))
for i in road:
  road[int(a[i]) - 1] += 1
  road[int(b[i]) - 1] += 1
for i in road:
    print(i)


### FIXED CODE ###

import numpy as np
n, m = map(int, input().split())
road = [0]*n
a = [0]*m
a = np.array(a)
b = [0]*m
b = np.array(b)
for i in range(m):
  x, y = input().split()
  a[i] = (int(x))
  b[i] = (int(y))
for i in range(m):
  road[int(a[i]) - 1] += 1
  road[int(b[i]) - 1] += 1
for i in road:
    print(i)
print(R-100*(10-N))

### FIXED CODE ###

N,R=map(int,input().split())
if(N>=10):print(R)
else:print(R+100*(10-N))
n, k = map(int, input().split())
ans = []
aru = []
nai = []
spe = []
f = []
m = 0
for i in range(n):
    t, d = map(int, input().split())
    nai.append([t,d])
nai = sorted(nai, key=lambda x: x[1], reverse = True)
for i in range(k):
    anstmp = nai.pop(0)
    if(anstmp[0] not in spe):
        ans.append(anstmp[1])
        spe.append(anstmp[0])
    else:
        aru.append(anstmp[1])

#print(ans, spe, aru)
#print("nai", nai)
f.append(sum(ans) + sum(aru))
s = len(spe)
for i in range(len(nai)):
    if(nai[i][0] not in spe):
        aru.pop(-1)
        ans.append(nai[i][1])
        spe.append(nai[i][0])
        f.append(sum(ans) + sum(aru))
#print(f)
for i in range(len(f)):
    m = max(m, f[i] + (s + i)**2)
print(m)


### FIXED CODE ###

n, k = map(int, input().split())
nai = [list(map(int, input().split())) for _ in range(n)]

nai = sorted(nai, key=lambda x: -x[1])

ans = 0
aru = []
spe = set()
m = 0
for i in range(k):
    anstmp = nai.pop(0)
    if(anstmp[0] not in spe):
        ans+=anstmp[1]
        spe.add(anstmp[0])
    else:
        aru.append(anstmp[1])
sumaru = sum(aru)
m = ans + sumaru + len(spe)**2

for i in range(len(nai)):
    if(len(aru) == 0): break
    if(nai[i][0] not in spe):
        sumaru-=aru.pop()
        ans+=nai[i][1]
        spe.add(nai[i][0])
    m = max(m, ans + sumaru + len(spe)**2)
print(m)
import math
from functools import reduce
input()
A = list(map(int,input().split()))

ans = 1
for i in range(N):
    g = reduce(math.gcd,A[:i]+A[i+1:])
    ans = max(ans,g)
print(ans)

### FIXED CODE ###

import math
from collections import deque
N = int(input())
A = list(map(int,input().split()))

M = 0
L = deque([0])
R = deque([0])
for i in range(1,N+1):
    L.append(math.gcd(L[-1],A[i-1]))
    R.appendleft(math.gcd(R[0],A[N-i]))
for j in range(N):
    m = math.gcd(L[j],R[j+1])
    M = max(M,m)
print(M)
while True:
    n,m = map(int,raw_input().split())
    if n == 0 and m == 0:
        break

    amari = n % m
    yasai = map(int,raw_input().split())
    yasai.sort()

    s = 0
    if amari > 0:
        s = sum(yasai[0:amari])

    i = 0
    for y in yasai[amari:]:
        if i % m > 0:
            s += y
        i+=1

    print(s)

### FIXED CODE ###

while True:
    try:
        n,m = list(map(int,input().split()))
        if n == 0 and m == 0:
            break
        amari = n % m
        yasai = list(map(int,input().split())) 
        yasai.sort()

        s = 0
        for i in range(n):
            if (i+1) % m > 0:
                s += yasai[-i-1]
        print(s)
    except:
        pass
n = int(input())
a = [int(stdins) for stdins in input().split()]

a.sort()

ans = n
divisibles = []
for i in range(n):
    divisible = False
    for j in range(n):
        if i == j:
            continue
        elif a[i] < a[j]:
            break
        elif divisibles[j]:
            continue
        elif a[i] % a[j] == 0:
            ans -= 1
            divisible = True
            break
    divisibles.append(divisible)

print(ans)


### FIXED CODE ###

# ABC170

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

a.sort()
a_max = max(a)
dp = [True for _ in range(a_max+1)]

ans = 0
for i in range(n):
    if dp[a[i]]:
        for j in range(0, a_max+1, a[i]):
            dp[j] = False
        if i > 0:
            if a[i] == a[i-1]:
                continue
        if i < n-1:
            if a[i] == a[i+1]:
                continue
        ans += 1

print(ans)
a, b = [int(i) in input().split(" ")]
c = a/b
print(int(a/b), a%b, "{0:.5f}".format(c), sep = " ")

### FIXED CODE ###

a, b = [int(i) for i in input().split(" ")]
num1 = a // b
num2 = a % b
num3 = "{:.8f}".format(a / b)

print(num1, num2, num3)
n, m = map(int, input().split())
h = list(map(int, input().split()))

good = 0

obs = [[] for i in range(n) ]

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

    higher = True
    if len(o) == 0:
        good += 1
        continue
    o = set(o)
    for i in o:
        if h[idx] <= h[i-1]:
            higher = False
    if higher:
        good += 1

print(good)


### FIXED CODE ###


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

good = 0

obs = [[] for i in range(n) ]

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

for idx,o in enumerate(obs):
    higher = True
    if len(o) == 0:
        good += 1
        continue
    o = set(o)
    for i in o:
        if h[idx] <= h[i-1]:
            higher = False
    if higher:
        good += 1

print(good)
def s(way):
    global w
    global wc

    for i in way:
        c[i] = 1
        if wc[i] == 0:
            wc[i] =1
            for j in w[i]:
                c[j]=1
                s(w[i])


n,m = map(int,input().split())
a = [0 for i in range(m)]
b = [0 for i in range(m)]
w = [[] for i in range(n)]
wc = [0 for i in range(n)]
c = [0 for i in range(n)]
for i in range(m):
    a[i],b[i] = map(int,input().split())
    w[a[i]-1].append(b[i]-1)
    w[b[i]-1].append(a[i]-1)
ans =-1
for i in range(n):
    if c[i] == 0:
        c[i] = 1
        wc[i] = 1
        ans += 1
        s(w[i])

print(ans)

### FIXED CODE ###


from collections import deque

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

w = [[] for i in range(n)]
c = [0 for i in range(n)]
for i in range(m):
    a,b = map(int,input().split())
    w[a-1].append(b-1)
    w[b-1].append(a-1)
ans =-1
for i in range(n):
    if c[i] == 0:
        c[i] = 1
        ans += 1
        d.append(i)
        while d:
            x = d.pop()
            for i in w[x]:
                if c[i] == 0:
                    c[i] = 1
                    d.append(i)

print(ans)
N = int(input())
dic = {}
for c in "MARCH":
    dic[c] = 0
myset = set(list("MARCH"))
for _ in range(N):
    c = input()[0]
    if c in myset:
        dic[c] += 1

res = 0
for i in range(N-2):
    for j in range(i+1, N-1):
        for k in range(j+1, N):
            res += dic["MARCH"[i]] * dic["MARCH"[j]] * dic["MARCH"[k]]
print(res)

### FIXED CODE ###

N = int(input())
dic = {}
for c in "MARCH":
    dic[c] = 0
myset = set(list("MARCH"))
for _ in range(N):
    c = input()[0]
    if c in myset:
        dic[c] += 1

res = 0
for i in range(5-2):
    for j in range(i+1, 5-1):
        for k in range(j+1, 5):
            res += dic["MARCH"[i]] * dic["MARCH"[j]] * dic["MARCH"[k]]
print(res)
N,A,B,C = map(int,input().split())
l = [int(input()) for i in range(N)]
inf = 10**9
def dfs(cur,a,b,c):
    if cur == N:
        return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else inf
    ret0 = dfs(cur+1,a,b,c)
    ret1 = dfs(cur+1,a+l(cur),b,c)
    ret2 = dfs(cur+1,a,b+l(cur),c)
    ret3 = dfs(cur+1,a,b,c+l(cur))
    
    return min(ret0,ret1,ret2,ret3)

print(dfs(0,0,0,0))

### FIXED CODE ###

N,A,B,C = map(int,input().split())
l = [int(input()) for i in range(N)]
inf = 10**9
def dfs(cur,a,b,c):
    if cur == N:
        return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else inf
    ret0 = dfs(cur+1,a,b,c)
    ret1 = dfs(cur+1,a+l[cur],b,c) + 10
    ret2 = dfs(cur+1,a,b+l[cur],c) + 10
    ret3 = dfs(cur+1,a,b,c+l[cur]) + 10
    
    return min(ret0,ret1,ret2,ret3)

print(dfs(0,0,0,0))
n = int(input())
d = list(map,input().split())
sum = 0
 
for i in range(n):
  for j in range(i+1,n):
    sum += (d[i]*d[j])
print(sum)

### FIXED CODE ###

n = int(input())
d = list(map(int,input().split()))
sum = 0
 
for i in range(n):
  for j in range(i+1,n):
    sum += (d[i]*d[j])
print(sum)
n,y = map(int,input().split())
ans = [-1,-1,-1]
cnt = 0

for i in range(n+1):
    if cnt == 1:
        break
        
    for j in range(n-i+1):
        k = n-i-j
        
        if i*10000 + j*5000 + k*1000 == y:
            ans = [i,j,k]
            cnt += 1
            break
                
print(*ans,sep=" ")

### FIXED CODE ###

print("2018"+input()[4:])
n, m = map(int, input().split())
ANS = [-1]*(n+1)
P = []
L = [[] for i in range(n+1)]
for i in range(m):
    a, b = map(int, input().split())

    if a == 1:
        ANS[b] = 1
        P.append(b)
    elif b == 1:
        ANS[a] = 1
        P.append(a)
    else:    
        L[a].append(b)
        L[b].append(a)

# print(L, ANS, P)

i = 0
while len(P) < n-1:
    for j in range(1, n+1):
        if P[i] in L[j] and ANS[j] == -1:
            P.append(j)
            L[j].remove(P[i])
            ANS[j] = P[i]
            # print(i, P[i], j, L, ANS, P)
    i += 1

print('Yes')
for i in range(2, n+1):
    print(ANS[i])


### FIXED CODE ###

s = input()
if s[-1] == '3':
    print('bon')
elif s[-1]=='0' or s[-1]=='1' or s[-1]=='6' or s[-1]=='8':
    print('pon')
else:
    print('hon')
A, B = map(int, input())
print(max(A, B)+max(A, B)-1)

### FIXED CODE ###

A, B = map(int, input().split())
if A==B:    
    print(max(A, B)+max(A, B))
else:
    print(max(A, B)+max(A, B)-1)
N, X = map(int, input().split())
city_lst = list(map(int, input().split()))
city_lst.sort()
dif_lst = []
tmp = city_lst[0]
for i in range(1, N):
	dif_lst.append(city_lst[i] - tmp)
	tmp = city_lst[i]
# print(city_lst)

if X < city_lst[0]:
	maximum_D = city_lst[0] - X
else:
	for i in range(N - 1):
		if city_lst[i] < X:
			maximum_D = min(abs(X - city_lst[i]), abs(city_lst[i + 1] - X))
			break

# print(maximum_D)
for D in reversed(range(1, maximum_D + 1)):
	fail = 0
	# print("D = {}".format(D))
	for dif in dif_lst:
		if dif % D != 0:
			fail = 1
			# print("fail = 1")
			break
	if not fail:
		print(D)
		break

### FIXED CODE ###

from fractions import gcd

N, X = (int(i) for i in input().split())

x = [abs(int(i) - X) for i in input().split()]  
for i in range(1,N):
	x[i] = gcd(x[i-1], x[i])

print(x[-1])
r = int(input())
g = int (input())
b = int(input())
numero=(r*100)+(g*10)+(b)
if numero%4==0:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

cores=input().split()
r,g,b=int(cores[0]), int(cores[1]), int(cores[2])
numero=(r*100)+(g*10)+(b)
if numero%4==0:
    print('YES')
else:
    print('NO')
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for _ in range(j)] for _ in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from itertools import accumulate #list(accumulate(A))

N, K = mi()
S = input()

len_list = [0]*(10**5+100)
ind = 0
if S[0] == '0':
    len_list[0] = 0
    ind += 1

cnt = 1
for i in range(1, N):
    if S[i] != S[i-1]:
        len_list[ind] = cnt
        ind += 1
        cnt = 1
    else:
        cnt += 1
len_list[ind] = cnt

#print(len_list[:30])
i = 0
wa = 0
sum_l = sum(len_list[:2*K+1])
while True:
    if len_list[i+2*K+1] != 0:
        wa = max(wa, sum_l)
    else:
        wa = max(wa, sum_l)
        break
    sum_l -= (len_list[i] + len_list[i+1])
    sum_l += (len_list[i+2*K+1] + len_list[i+2*K+2])
    i += 2
print(wa)


        



### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for _ in range(j)] for _ in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from itertools import accumulate #list(accumulate(A))

N, K = mi()
S = input()
inds = [[0, 0]]

flag = 0
s = 0
for i in range(N):
    if S[i] == '0':
        if not flag:
            flag = 1
            inds.append([s, i-1])
    else:
        if flag:
            s = i
        flag = 0
if flag:
    inds.append([N-1, N-1])
if not flag:
    inds.append([s, N-1])
#print(inds)
l_inds = len(inds)
wa = 0
if K >= l_inds-1:
    print(N)
    exit()
for i in range(l_inds-K):
    wa = max(inds[i+K][1] - inds[i][0] + 1, wa)

print(wa)
num = int(input())
array = map(int, input().split())
sum = 0

for (i = 0; i < num; i++):
	if i == 0:
      sum += i
    else if i < (num-1):
      if array[i] > array[i-1]:
        sum += array[i]
      else:
        sum += array[i-1]
    else:
      sum += array[i-1]
        
print(sum)
      
        
    
  

### FIXED CODE ###

num = int(input())
array = list(map(int, input().split()))
sum = 0
 
for i in range(num):
	if i == 0:
		sum += array[i]
	elif i < (num-1):
		if array[i] > array[i-1]:
			sum += array[i-1]
		else:
			sum += array[i]
	else:
		sum += array[i-1]
        
print(sum)
n,m=map(int,input().split())
l=[list(map(int,input().split()))for i in range(m)]
dist=[[1<<29]*n for i in range(n)]
for i in range(m): dist[i][i]=0
for a in l:
  dist[a[0]-1][a[1]-1] = min(dist[a[0]-1][a[1]-1],a[2])
  dist[a[1]-1][a[0]-1] = min(dist[a[1]-1][a[0]-1],a[2])
for k in range(n):
  for i in range(n):
    for j in range(n):
      dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])
# 経路復元
ans=m
for a in l:
  flag=False
  for j in range(n): 
    if dist[j][a[0]-1]+a[2]==dist[j][a[1]-1]: flag=True
  if flag: ans-=1
print(ans)

### FIXED CODE ###

n,m=map(int,input().split())
l=[list(map(int,input().split()))for i in range(m)]
dist=[[1<<29]*n for i in range(n)]
for i in range(n): dist[i][i]=0
for a in l:
  dist[a[0]-1][a[1]-1] = min(dist[a[0]-1][a[1]-1],a[2])
  dist[a[1]-1][a[0]-1] = min(dist[a[1]-1][a[0]-1],a[2])
# print(dist)
for k in range(n):
  for i in range(n):
    for j in range(n):
      dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])
# 経路復元
ans=m
for a in l:
  flag=False
  for j in range(n): 
    if dist[j][a[0]-1]+a[2]==dist[j][a[1]-1]: flag=True
  if flag: ans-=1
print(ans)
import math
menu = []
for i in range(0, 5):
        menu.append(int(input()))
df = max([10 - i % 10 for i in menu if i % 10 != 0 ])
sum = 0
for i in menu:
        sum += ((i + 9) // 10) * 10
if(df == 0):
        print(sum)
else:
        print(sum-df)

### FIXED CODE ###

import math
menu = []
for i in range(0, 5):
        menu.append(int(input()))
df = max([10 - i % 10 for i in menu if i % 10 != 0 ],default=0)
sum = 0
for i in menu:
        sum += ((i + 9) // 10) * 10
if(df == 0):
        print(sum)
else:
        print(sum-df)
import sys
from collections import Counter

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c for j in range(b)] for i in range(a)]
def list3d(a, b, c, d): return [[[d for k in range(c)] for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e for l in range(d)] for k in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10**9)
INF = 10**19
MOD = 10**9 + 7
EPS = 10**-10

N = INT()
A = LIST()
B = LIST()

C1 = Counter(A)
C2 = Counter(B)
for k, v in C1.items():
    if v > N-C2[k]:
        No()
        exit()

ans1 = B[N//2:] + B[:N//2]
ans2 = B[ceil(N, 2):] + B[:ceil(N, 2)]
ans3 = B[ceil(N, 2)+1:] + B[:ceil(N, 2)+1]

def check(A, B):
    for i in range(N):
        if A[i] == B[i]:
            return False
    return True

if check(A, ans1):
    Yes()
    print(*ans1)
elif check(A, ans2):
    Yes()
    print(*ans2)
else:
    print(*ans3)


### FIXED CODE ###

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c for j in range(b)] for i in range(a)]
def list3d(a, b, c, d): return [[[d for k in range(c)] for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e for l in range(d)] for k in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10**9)
INF = 10**19
MOD = 10**9 + 7
EPS = 10**-10

N = INT()
U = []
V = []
for i in range(N):
    x, y = MAP()
    U.append(x+y)
    V.append(x-y)

U.sort()
V.sort()
ans = max(U[-1]-U[0], V[-1]-V[0])
print(ans)
from collections import Counter
n=int(input())
nums=list(map(int,input().split()))
a=set(nums)
if len(a)==1:
  print(n//2)
else:
  odd=nums[::2]
  even=nums[1::2]
  o=Counter(odd)
  e=Counter(even)
  ans=n-o.most_common()[0][1]-e.most_common()[0][1]
  if o.most_common()[0][0]==e.most_common()[0][0]:
    print(ans+min(o.most_common[1][1]-o.most_common[0][1],e.most_common[1][1]-e.most_common[0][1]))
  else:  
    print(ans)


### FIXED CODE ###

from collections import Counter
n=int(input())
nums=list(map(int,input().split()))
a=set(nums)
if len(a)==1:
  print(n//2)
else:
  odd=nums[::2]
  even=nums[1::2]
  o=Counter(odd)
  e=Counter(even)
  ans=n-o.most_common()[0][1]-e.most_common()[0][1]
  if o.most_common()[0][0]==e.most_common()[0][0]:
    print(ans+min(o.most_common()[0][1]-o.most_common()[1][1],e.most_common()[0][1]-e.most_common()[1][1]))
  else:  
    print(ans)
N,M = map(int,input().split())
import numpy as np
A = sorted(np.array(list(map(int,input().split()))),reverse=True)
bi = [0]*(A[0]+1)
for a in A:
  bi[a]+=1
  
cum = [0]*(A[0]+1)
for i in range(1,A[0]+1):
  cum[i]=cum[i-1]+bi[i]

cum_max=cum[-1]
left = 0
right = A[0]*2
while right-1!=left:
  x = (right+left)//2
  num = 0
  for a in A:
    b = max(x-a,1)
    if b<=A[0]:
      num += cum_max-cum[b-1]
    
  if num>M:
    left=x
  else:
    right=x
ans = 0
for a in A:
  b = max(x-a,1)
  c = cum_max-cum[b-1]
  ans+=(a*c)+(sum(A[:c]))
  
print(ans)

### FIXED CODE ###

N,M = map(int,input().split())
A = sorted(list(map(int,input().split())),reverse=True)
bi = [0]*(A[0]+1)
for a in A:
  bi[a]+=1
  
cum = [0]*(A[0]+1)
for i in range(1,A[0]+1):
  cum[i]=cum[i-1]+bi[i]

cum_max=cum[-1]
left = 0
right = A[0]*2+1
while right-1!=left:
  x = (right+left)//2
  num = 0
  for a in A:
    b = max(x-a,1)
    if b<=A[0]:
      num += cum_max-cum[b-1]
    
  if num>=M:
    left=x
  else:
    right=x

ans = 0
cum_A = [0]*(N+1)
for i in range(1,N+1):
  cum_A[i]=cum_A[i-1]+A[i-1]
for a in A:
  b = max(right-a,1)
  if b>A[0]:
    break
  c = cum_max-cum[b-1]
  M-=c
  ans+=(a*c)+cum_A[c]
  

ans+=M*left
print(ans)
n,x,m=map(int,input().split())
l=[-1]*m
s=[0]*m
t=p=0
while l[x]<0:
  l[x]=t
  s[x]=s[p]+x
  p=x
  x=pow(p,2,m)
  t+=1
T=t-l[x]
S=s[p]+x-s[x]
if n<l[x]:
  print(s[l.index((n-1)%m)])
else:
  print(S*((n-l[x])//T)+s[l.index((l[x]+(n-l[x])%T-1)%m)])

### FIXED CODE ###

n,x,m=map(int,input().split())
l=[-1]*m
s=[0]*m
t=p=0
while l[x]<0:
  t+=1
  l[x]=t
  s[x]=s[p]+x
  p=x
  x=pow(p,2,m)
T=t+1-l[x]
S=s[p]+x-s[x]
if n<l[x]:
  print(s[l.index(n)])
else:
  print(S*((n-l[x])//T)+s[l.index(l[x]+(n-l[x])%T)])
N = int(input())
T = [int(input()) for _ in range(N)]

import fractions
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

print(lcm_list(T))


### FIXED CODE ###

N = int(input())
T = [int(input()) for _ in range(N)]

import fractions
from functools import reduce

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

print(lcm_list(T))
import sys
sys.setrecursionlimit(10**9)

read=sys.stdin.read
class Unionfind():
    def __init__(self,n):
        self.parents=[-1]*n
        self.dist=[0]*n 
    
    def find(self,*args):
        x=args[0]
        if self.parents[args[0]]<0:
            return self.dist[x],x
        else:
            self.dist[x], self.parents[x]=self.find(self.parents[x],x)
            return self.dist[args[1]]+self.dist[x], self.parents[x]
    
    def union(self,x,y,d):
        rx=self.find(x,self.parents[x])[1]
        ry=self.find(y,self.parents[x])[1]
        diff=self.dist[y]-self.dist[x]-d
        if rx==ry:
            if diff!=0:
                return True
            return False
        if diff<0:
            rx,ry=ry,rx
            diff=-diff
        self.parents[ry]=min(self.parents[ry],self.parents[rx]-diff)
        self.parents[rx]=ry
        self.dist[rx]=diff
        return False
    
def main():
    n,m,*lrd=map(int,read().split())
    v=Unionfind(n)
    for l,r,d in zip(*[iter(lrd)]*3):
        if v.union(l-1,r-1,d):
            print('No')
            break
    else:
        print('Yes')
if __name__=='__main__':
    main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

read=sys.stdin.read
class Unionfind():
    def __init__(self,n):
        self.parents=[-1]*n
        self.dist=[0]*n 
    
    def find(self,x):
        if self.parents[x]<0:
            return self.dist[x],x
        else:
            tmp=self.find(self.parents[x])
            self.dist[x]+=tmp[0]
            self.parents[x]=tmp[1]
        return self.dist[x], self.parents[x]
    
    def union(self,x,y,d):
        rx=self.find(x)[1]
        ry=self.find(y)[1]
        diff=self.dist[y]-self.dist[x]-d
        if rx==ry:
            if diff!=0:
                return True
            return False
        if diff<0:
            rx,ry=ry,rx
            diff=-diff
        self.parents[ry]=min(self.parents[ry],self.parents[rx]-diff)
        self.parents[rx]=ry
        self.dist[rx]=diff
        return False
    
def main():
    n,m,*lrd=map(int,read().split())
    v=Unionfind(n)
    for l,r,d in zip(*[iter(lrd)]*3):
        if v.union(l-1,r-1,d):
            print('No')
            break
    else:
        if max(-d-1 for d in v.parents if d<0) >10**9:
            print('No')
        else:
            print('Yes')
if __name__=='__main__':
    main()
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    print('YES' if abs(x2 - x1)*(y4 - y3) - (x4 - x3)*(y2 - y1)) < 1e-10 else 'NO')

### FIXED CODE ###

n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    print('YES' if abs((x2 - x1)*(y4 - y3) - (x4 - x3)*(y2 - y1)) < 1e-10 else 'NO')
n = int(input())
a = [int(input()) for i in range(n)]

# ほとんどは全体のmax?
m1 = max(a)

# max値が多い場合用に2nd max
a2 = list(set(a))
a2.remove(m1)
m2 = max(a2)

for i in range(n):
  if a[i] == m1:
    print(m2)
  elif a[i] == m2:
    print(max(a[:i]+a[i+1:]))
  else:
    print(m1)

### FIXED CODE ###

n = int(input())
a = [int(input()) for i in range(n)]

# ほとんどは全体のmax?
m1 = max(a)

# max値が多い場合用に2nd max
m2 = sorted(a)[n-2]

for i in range(n):
  if a[i] == m1:
    print(m2)
  else:
    print(m1)
n = int(raw_input())
for i in range(n):
    x0, y0, x1, y1, x2, y2, x3, y3 = map(float, raw_input().split())
    if float(y1-y0)/(x1-x0) == float(y3-y2)/(x3-x2):
        print 'YES'
    else:
        print 'NO'    

### FIXED CODE ###

n = int(raw_input())
for i in range(n):
    x0, y0, x1, y1, x2, y2, x3, y3 = map(float, raw_input().split(' '))
    if x0==x1 or x2==x3:
        if x0==x1 and x2==x3:
            print 'YES'
        else:
            print 'NO'
    elif abs(float(y1-y0)/(x1-x0) - float(y3-y2)/(x3-x2)) < 1e-10:
        print 'YES'
    else:
        print 'NO'