Harryxun/stf_run huggingface dataset:
import sys
import math
from collections import defaultdict
from collections import deque

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()


# Nの素因数分解を辞書で返す
def prime_fact(n):
    root = int(math.sqrt(n))
    prime_dict = {}
    for i in range(2, root+1):
        cnt = 0
        while n % i == 0:
            cnt += 1
            n = n // i
        if cnt:
            prime_dict[i] = cnt
    if n != 1:
        prime_dict[n] = 1
    return prime_dict


def combination_mod_initialize(n, MOD=10**9+7):
    fac = [1]*(n+1)
    inv = [1]*(n+1)
    for i in range(1, n+1):
        fac[i] = fac[i-1] * i % MOD
        inv[i] = inv[i-1] * pow(i, -1, MOD) % MOD
    return fac, inv

# 二項係数　高速
def combination_mod(n, r, fac, inv, mod=10**9+7):
    return fac[n] * inv[r] * inv[n-r]


def main():
    N, M = NMI()
    PD = prime_fact(M)
    ans = 1
    fac, inv = combination_mod_initialize(10**6, MOD)

    for x in list(PD.values()):
        ans = ans * combination_mod(N+x-1, N-1, fac, inv) % MOD

    print(ans)



if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
import math
from collections import defaultdict
from collections import deque

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()


# Nの素因数分解を辞書で返す
def prime_fact(n):
    root = int(math.sqrt(n))
    prime_dict = {}
    for i in range(2, root+1):
        cnt = 0
        while n % i == 0:
            cnt += 1
            n = n // i
        if cnt:
            prime_dict[i] = cnt
    if n != 1:
        prime_dict[n] = 1
    return prime_dict


def combination_mod_initialize(n, MOD=10**9+7):
    fac = [1]*(n+1)
    inv = [1]*(n+1)
    for i in range(1, n+1):
        fac[i] = fac[i-1] * i % MOD
        inv[i] = inv[i-1] * pow(i, -1, MOD) % MOD
    return fac, inv

# 二項係数　高速
def combination_mod(n, r, fac, inv, mod=10**9+7):
    return fac[n] * inv[r] * inv[n-r]


def main():
    N, M = NMI()
    PD = prime_fact(M)
    ans = 1
    fac, inv = combination_mod_initialize(10**6, MOD)

    for x in list(PD.values()):
        ans = ans * combination_mod(N+x-1, N-1, fac, inv) % MOD

    print(ans)



if __name__ == "__main__":
    main()
# coding: utf-8
# Your code here!
import sys

N = int(input())

if N % 2 == 0:
    print((N-2)*(N-1)//2)
    for i in range(N):
        for j in range(i,N):
            if (i+1+j+1) != (N+1):
            print((i+1)+' '(j+1))
else:
    print((N-2)*(N-1)//2)
    for i in range(N):
        for j in range(i,N):
            if (i+1+j+1) != (N):
            print((i+1)+' '(j+1))

### FIXED CODE ###

# coding: utf-8
# Your code here!
import sys

N = int(input())

ans = []

if N % 2 == 0:
    tmp = N + 1
else:
    tmp = N
    
for i in range(1,N+1):
    for j in range(i+1,N+1):
        if i + j != tmp:
            ans.append(str(i)+' '+str(j))
            
print(len(ans))

for a in ans:
    print(a)
def check(a):
  for i in range(1,len(n)):
    if a[i-1]>a[i]:
      return False
  return True
n=int(input())
a=list(map(int,input().split()))
if check(a):
  print('YES')
  exit()
for i in range(n):
  for j in range(n):
    if i==j:
      continue
    a[i],a[j]=a[j],a[i]
    if check(a):
      print('YES')
      exit()
    a[i],a[j]=a[j],a[i]
print('NO')

### FIXED CODE ###

def check(a):
  for i in range(1,len(a)):
    if a[i-1]>a[i]:
      return False
  return True
n=int(input())
a=list(map(int,input().split()))
if check(a):
  print('YES')
  exit()
for i in range(n):
  for j in range(n):
    if i==j:
      continue
    a[i],a[j]=a[j],a[i]
    if check(a):
      print('YES')
      exit()
    a[i],a[j]=a[j],a[i]
print('NO')
A,B=map(int,input().split())

def get_cd(x1,x2):
    cd=[]
    for i in range(1,min(x1,x2)+1):
        if x1%i==0 and x2%i==0:
            cd.append(i)
    return cd

cd_AB=get_cd(A,B)

for j in range (0,len(cd_AB)-1):
    for k in range(j+1,len(cd_AB)):
            if(len(get_cd(cd_AB[j],cd_AB[k]))>1):
                cd_AB[k]=0

print(len(cd_AB)-cd_AB.count(0))

### FIXED CODE ###

N=int(input())

if(N%2==0):
    p=0.5
else:
    p=(N+1)/(2*N)
print(p)
N, M = map(int, input().split())
A_list = []
dic_A = {}
flag = True
for i in range(M):
    A = list(map(int, input().split()))
    if A[0] in dic_A:
        if dic_A[A[0]]!=A[1]:
            flag = False
    else:
        dic_A[A[0]] = A[1]
    A_list.append(A)
for i in range(M):
    if A_list[i][0]==1 and A_list[i][1]==0:
        flag = False
if flag == False:
    print(-1)
else:
    ans = ["0" for i in range(3)]
    for i, v in sorted(dic_A.items()):
        v = str(v)
        ans[i-1] = v
    if "".join(ans)[0] != "0":
        N, M = map(int, input().split())
A_list = []
dic_A = {}
flag = True
for i in range(M):
    A = list(map(int, input().split()))
    if A[0] in dic_A:
        if dic_A[A[0]]!=A[1]:
            flag = False
    else:
        dic_A[A[0]] = A[1]
    A_list.append(A)
for i in range(M):
    if A_list[i][0]==1 and A_list[i][1]==0:
        flag = False
if flag == False:
    print(-1)
else:
    ans = ["0" for i in range(3)]
    for i, v in sorted(dic_A.items()):
        v = str(v)
        ans[i-1] = v
    if "".join(ans)[0] != "0":
        print(int("".join(ans)))
    else:
        print(-1)

### FIXED CODE ###

N, M = map(int, input().split())
sc_list = []
for i in range(M):
    sc = list(map(int, input().split()))
    sc_list.append(sc)
ans = -1
for i in range(10**N):
    tmp = str(i)
    if len(tmp)==N:
        flag = True
        for j in sc_list:
            if int(tmp[j[0]-1])!=j[1]:
                flag = False
        if flag:
            ans = int(tmp)
            break
print(ans)
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


from collections import defaultdict
n, M = map(int, input().split())
ns = defaultdict(set)
for _ in range(n-1):
    u,v = map(int, input().split())
    ns[u-1].add(v-1)
    ns[v-1].add(u-1)

N = M+4 # 必要なテーブルサイズ
g1 = [None] * (N+1) # 元テーブル
g2 = [None] * (N+1) #逆元テーブル
inverse = [None] * (N+1) #逆元テーブル計算用テーブル
g1[0] = g1[1] = g2[0] = g2[1] = 1
inverse[0], inverse[1] = [0, 1] 

for i in range( 2, N + 1 ):
    g1[i] = ( g1[i-1] * i ) % M 
    inverse[i] = ( -inverse[M % i] * (M//i) ) % M # ai+b==0 mod M <=> i==-b*a^(-1) <=> i^(-1)==-b^(-1)*aより
    g2[i] = (g2[i-1] * inverse[i]) % M 

ws = {}
bs = {}
def sub(u, p):
    if (p,u) in ws:
        return ws[p,u], bs[p,u]
    w = 1
    b = 1
    for v in ns[u]:
        if v==p:
            continue
        ww,bb = sub(v, u)
        w += (bb-1)
        b *= (1+bb)
        b %= M
    ws[p,u] = w % M
    bs[p,u] = b % M
    return w,b
def sub2(u, p):
    for v in ns[u]:
        if v==p:
            continue
        w1, b1 = ws[p,u], bs[p,u]
        w2, b2 = ws[u,v], bs[u,v]
        w3, b3 = ws[u,p], bs[u,p]
        ww = w1 - (b2-1) + (b3-1)
        bb = b1 * (inverse[1+b2]) * (1+b3)
        ws[u,p], bs[u,p] = ww,bb
        
sub(0, -1)
ws[0,-1] = 1
bs[0,-1] = 1
sub2(0,-1)

ans = [None]*n
for u in range(n):
    ans[u] = sub(u, -1)[1] % M
write("\n".join(map(str, ans)))

### FIXED CODE ###

import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


from collections import defaultdict
n, M = map(int, input().split())
ns = defaultdict(list)
for _ in range(n-1):
    u,v = map(int, input().split())
    ns[u-1].append(v-1)
    ns[v-1].append(u-1)

bs = {}
cump0 = defaultdict(list)
cump1 = defaultdict(list)
def sub(u, p):
    if (p,u) in bs:
        return bs[p,u]
    b = 1
    ps = []
    for v in ns[u]:
        if v==p:
            continue
        bb = sub(v, u)
        b *= (1+bb)
        b %= M
        ps.append(bb)
    v0 = 1
    v1 = 1
    l = len(ps)
    for i in range(l):
        cump0[u].append(v0)
        cump1[u].append(v1)
        v0 *= ps[i]+1
        v1 *= ps[l-1-i]+1
        v0%=M;v1%=M
    cump0[u].append(v0)
    cump1[u].append(v1)
        
    bs[p,u] = b % M
    return b

ans = [None]*n
def sub2(u, p):
    i = 0
    for v in ns[u]:
        if v==p:
            continue
        b1 = bs[p,u]
        b2 = bs[u,v]
        b3 = bs[u,p]
        if p>=0:
            bb = (cump0[u][i] * cump1[u][-(i+2)] * (1+b3)) % M
        else:
            bb = (cump0[u][i] * cump1[u][-(i+2)]) % M
        bs[v,u] = bb
        ans[v] = bs[u,v] * (1+bb) % M
        sub2(v,u)
        i += 1
        
sub(0, -1)
bs[0,-1] = 1
ans[0] = bs[-1,0]
sub2(0,-1)

# for u in range(n):
#     ans[u] = sub(u, -1)[1] % M
write("\n".join(map(str, ans)))
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
import pprint
sys.setrecursionlimit(10 ** 9)


INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007



n, m = LI()
sc = LIR(m)
for i in range(10 ** (n - 1) - 1, 10 ** n):
    for s, c in sc:
        if str(i)[s - 1] != str(c):
            break
    else:
        print(i)
        exit()
else:
    print(-1)


### FIXED CODE ###

from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
import pprint
sys.setrecursionlimit(10 ** 9)


INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007



n, m = LI()
ret = [''] * n
for _ in range(m):
    s, c = LI()
    if ret[s - 1] and ret[s - 1] != str(c):
        print(-1)
        exit()
    elif s == 1 and c == 0 and n != 1:
        print(-1)
        exit()
    else:
        ret[s - 1] = str(c)

for i in range(n):
    if not ret[i]:
        ret[i] = '0' if i or n == 1 else '1'

ans = ''.join(ret)
print(ans)
# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""

a = input()
ｂ = input()
c =  int(a) * int(b)

if c%2 == 0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

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

if c%2 == 0:
    print("Even")
else:
    print("Odd")
s,t = input(),input()
print(t+s)

### FIXED CODE ###

print("".join((input().split())[::-1]))
n = int(input())
A = [int(input()) for i in range(n)] 

B = set(A)

C = [item for item in A if item not in B]
print(len(C))

### FIXED CODE ###

N = input()
result = "No"
for i in N:
    if i == '9':
        result = "Yes"
print(result)
N=input()
1<=N<=100
ans=(N+1)//2
print(ans)


### FIXED CODE ###

N=int(input())
import math
ans=math.ceil(N/2)
print(ans)
S = list(input())
T = list(input())
if len(S)<len(T):
    print("UNRESTORABLE")
    exit()
l = 0
S = S[::-1]
T = T[::-1]
for s in range(len(S)-len(T)+1):
    if S[s]=="?" or S[s] == T[0]:
        k = 0
        for t in range(len(T)):
            if S[s+t]!="?" and S[s+t]!=T[t]:
                break
            else:
                k+=1
    if k==len(T):
        l = s
        break
if k<len(T):
    print("UNRESTORABLE")
else:
    ans = []
    for i in range(len(S)):
        if l <= i and i < k:
            ans.append(T[i-l])
        elif S[i]=="?":
            ans.append("a")
        else:
            ans.append(S[i])
    print("".join(ans[::-1]))

### FIXED CODE ###

S = list(input())
T = list(input())
if len(S)<len(T):
    print("UNRESTORABLE")
else:
    S = S[::-1]
    T = T[::-1]
    k = 0
    l = 0
    for i in range(len(S)-len(T)+1):
        if S[i]=="?" or S[i]==T[0]:
            k = 0
            for j in range(len(T)):
                if S[i+j]=="?" or S[i+j]==T[j]:
                    k+=1
        if k==len(T):
            l = i
            break
    if k!=len(T):
        print("UNRESTORABLE")
    else:
        ans = []
        for i in range(len(S)):
            if l <= i and i < l+k:
                ans.append(T[i-l])
            elif S[i]=="?":
                ans.append("a")
            else:
                ans.append(S[i])
        print("".join(ans[::-1]))
import numpy as np
N, M, C = [int(x) for x in input().split()]
B = np.array([int(x) for x in input().split()])
A = np.array([[int(x) for x in input().split()] for _ in range(N)])
 
print(np.sum(A.dot(B) > -C))

### FIXED CODE ###

H, W = [int(x) for x in input().split()]
h, w = [int(x) for x in input().split()]
print((H-h)*(W-w))
A, B=map(int, input().split()
S=(A-1)*(B-1)
print(S)
         

### FIXED CODE ###

A, B=map(int, input().split())
S=(A-1)*(B-1)
print(S)
x,n = map(int, input().split())
if n != 0:
    p = list(map(int, input().split()))
else:
    print(x)

smaller = 0
for i in range(x):
    if x - i in p:
        pass
    else:
        smaller = x-i
        break

bigger = 2*x
for j in range(x):
    if x + j in p:
        pass
    else:
        bigger = x + j
        break

ans = smaller if x - smaller <= bigger - x else bigger
#print(bigger)
print(ans)

### FIXED CODE ###

x,n = map(int, input().split())
if n != 0:
    p = list(map(int, input().split()))
    smaller = 0
    for i in range(x):
        if x - i in p:
            pass
        else:
            smaller = x-i
            break

    bigger = 2*x
    for j in range(x):
        if x + j in p:
            pass
        else:
            bigger = x + j
            break

    ans = smaller if x - smaller <= bigger - x else bigger
    #print(bigger)
    print(ans)
else:
    print(x)
A, B = map(float, input().split())

A = int(a)
B = round(100*B)

ans = int(int(A*B)//100)
print(ans)

### FIXED CODE ###

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

A = int(A)
B = round(100*B)

ans = int(int(A*B)//100)
print(ans)
#coding:utf-8

H, W = input().split()
h, w = input().split()

for s in [H,W,h,w]:
    s = int(s)
    print(type(s))

ans = (H - h) * (W - w)
print(ans)

### FIXED CODE ###

#coding:utf-8

H, W = input().split()
h, w = input().split()

ans = ( int(H)-int(h) ) * ( int(W)-int(w) )
print(ans)
import numpy as np

N,M = map(int,input().split())
inputs.pop(0)
vector = np.zeros((N, N))

for i in range(0, M):
	A,B = map(int,input().split())
	vector[A-1:A,B-1:B] = 1
	vector[B-1:B,A-1:A] = 1

depth = np.zeros((1, N))
que = [0]

while not que == []:
	room = que[0]
	que.pop(0)
	search = np.where(vector[room:room+1]==1)[1]
	for next_room in search:
		if not depth[:,next_room:next_room+1] == 0 or next_room == 0:
			continue
		depth[:,next_room:next_room+1] = depth[:,room:room+1]+1
		que.append(next_room)

if 0 in depth[:,1:][0]:
	print("No")
else:
	print("Yes")
	for dep in depth[:,1:][0]:
		print(np.where(depth==dep-1)[1][0]+1)

### FIXED CODE ###

n,m = map(int,input().split())
visited = [-1 for _ in range(n+1)]
visited[1] = 0
will = []
root = [[] for _ in range(n+1)] 
for i in range(m):
    a,b = map(int,input().split())
    root[a].append(b)
    root[b].append(a)

will.append(1)

while will:
    visit = will.pop(0)
    for i in root[visit]:
        if visited[i] != -1:
            continue
        will.append(i)
        visited[i] = visit

if visited[1:] == -1:
    print('No')
else:
    print('Yes')
    for i in range(2,len(visited)):
        print(visited[i])
import collections
from collections import OrderedDict

#入力
N = int(input())
S = [input() for i in range(N)]

#出現回数のカウント
c = collections.Counter(S)
c_val = list(c.values())
c_key = list(c.keys())

"""
print(c)
print(c_val)
print(c_key)
"""

#多い順に並べ替えた辞書をつくる
c_sorted = OrderedDict(sorted(c.items(), key = lambda x : x[1], reverse=True))
c_sorted_val = list(c_sorted.values())
c_sorted_key = list(c_sorted.keys())

"""
print(c_sorted)
print(c_sorted_val)
print(c_sorted_key)
"""

#回数が多いものを抜き出したリストの制作
c_max = list(c_sorted_key[0])

i=1
if len(c_val)>1:
    while c_val[i-1]==c_val[i]:
        c_max.append(c_key[i])
        i+=1
        if i==len(c_max):
            break

"""
print(c_max)
"""

#keyを降順に並べ替え
c_max.sort()

"""
print(c_max)
print(c_max[0])
"""

#表示
for i in range(len(c_max)):
    print(c_max[i])


### FIXED CODE ###

import collections
from collections import OrderedDict

#入力
N = int(input())
S = [input() for i in range(N)]

#出現回数のカウント
c = OrderedDict(collections.Counter(S))
ln = len(c.values())

#多い順に並べ替えた辞書をつくる
d = OrderedDict(sorted(c.items(), key = lambda x : x[1], reverse=True))
dval = list(d.values())
dkey = list(d.keys())

#回数が多い単語を抜き出したリストの制作
word = list()
word.append(dkey[0])
i=1
if ln>1:
    while dval[i-1]==dval[i]:
        word.append(dkey[i])
        i+=1
        if i==ln:
            break

#辞書順に並べ替える
dic = sorted(word)

#表示
for i in range(len(dic)):
    print(dic[i])
def survey(now, mlist, clist):
    for ml in mlist[now]:
        if clist[ml[0]]==2:
            clist[ml[0]]=(clist[now]+ml[1])%2
            _, _=survey(ml[0], mlist, clist)
    return mlist, clist

n=int(input())
mlist=[]
clist=[]
for i in range(n):
    mlist.append([])
    clist.append(2)

for i in range(n-1):
    u, v, m = map(int, input().split())
    u-=1
    v-=1
    mlist[u].append([v, m%2])
    mlist[v].append([u, m%2])

#print(mlist)
clist[0]=0
now=0
mlist, clist = survey(now, mlist, clist)
for cl in clist:
    print(cl)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6) 

def survey(now, mlist, clist):
    for ml in mlist[now]:
        if clist[ml[0]]==2:
            clist[ml[0]]=(clist[now]+ml[1])%2
            _, _=survey(ml[0], mlist, clist)
    return mlist, clist

n=int(input())
mlist=[]
clist=[]
for i in range(n):
    mlist.append([])
    clist.append(2)

for i in range(n-1):
    u, v, m = map(int, input().split())
    u-=1
    v-=1
    mlist[u].append([v, m%2])
    mlist[v].append([u, m%2])

clist[0]=0
now=0
mlist, clist = survey(now, mlist, clist)
for cl in clist:
    print(cl)
t=int(input())

h=t/3600
m=(t-h*3600)/60
s=t-h*3600-m*60
print %d:%d:%d % (h,m,s)

### FIXED CODE ###

t=input()
h=t/3600
m=(t%3600)/60
s=t%60

print "%d:%d:%d" %(h,m,s)
n,k = input().split()
a = list(map(int,input().split()))
ten1 =0
ten2 =0
for x in range(int(n)-int(k)):
    ten1 = 0
    ten2 = 0
    for y in range(int(k)):
        ten1 += a[y+x]
        ten2 += a[y+1+x]
    if ten1 < ten2:
       print("Yes")
    else:
        print("No")


### FIXED CODE ###

n = int(input())

if n <= 599:
    print("8")
elif n <=799:
    print("7")
elif n <=999:
    print("6")
elif n <=1199:
    print("5")
elif n <=1399:
    print("4")
elif n <=1599:
    print("3")
elif n <=1799:
    print("2")
elif n <=1999:
    print("1")
n = int(input())
s = list(input())
num = 0
k = -1
for i in range(1,n):
  if i + k == n:
    break
  if s[-i] == 'R':
    j = k+1
    while True:
      if s[j] == 'W':
        s[j] = 'R'
        s[-i] = 'W'
        k = j
        num += 1
        break
      j += 1
    
print(num)      
      
    

### FIXED CODE ###

n = int(input())
s = list(input())
num = 0
k = -1
for i in range(1,n):
  if i + k >= n-1:
    break
  if s[-i] == 'R':
    j = k+1
    while True:
      if j +i == n:
        k = j
        break
      if s[j] == 'W':
        s[j] = 'R'
        s[-i] = 'W'
        k = j
        num += 1
        break
      j += 1
      
print(num)
# -*- coding: utf-8 -*-
import sys
import collections
import math
# code start
def lcm(a,b):
	return a*b/math.gcd(int(a),int(b))

def main():
	count = int(input())
	i = 0
	temp = 1
	while(i<count):
		i+=1
		num = int(input())
		temp = lcm(temp,num)
	print(int(temp))


main()

# code end


### FIXED CODE ###

import sys
import collections
import math
import fractions

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

def main():
	count = int(input())
	i = 0
	tmp = 1
	while(i < count):
		i += 1
		num = int(input())
		tmp = lcm(tmp,num)
	print(int(tmp))
if __name__ == '__main__':
	main()
H,W = map(int,input().split())

grid = [list(str(input())) for _ in range(H)]

def elim(grid):
    grid_after = []
    for i in range(H):
        gset = list(set(grid[i]))
        #print(gset)
        #print(grid[i])
        if gset[0] != '.':
            grid_after.append(grid[i])
    return grid_after
    
def transpose(grid_after):
    
    H1 = len(grid_after)
    W1 = len(grid_after[0][:])
    gridT = [['']*H1 for _ in range(W1)]
    for i in range(W1):
        for j in range(H1):
            gridT[i][j] = grid_after[j][i]
            
            
    return gridT

grid_after = elim(grid)

gridT1 = transpose(grid_after)
#print(gridT1)
grid_after2 = elim(gridT1)
# print(grid_after2)
gridT2 = transpose(grid_after2)
#print(gridT2)
for i in gridT2:
    print(*i,sep='')

### FIXED CODE ###

def elimrow(lst):
    lst_after = []
    gset = []
    H1 = len(lst)
    for i in range(H1):
        gset = list(set(lst[i]))
        gset.sort()
        #print(gset)
        if gset[0] != '.':
            lst_after.append(lst[i])
    return lst_after

def trans(lst):
    return list(zip(*lst))

def main():
    H,W = map(int,input().split())

    grid = [list(str(input())) for _ in range(H)]
    grid_after = []
    grid_after = elimrow(grid)
    gridT = trans(grid_after)
    grid_after2 = elimrow(gridT)
    gridT2 = trans(grid_after2)
    #print(gridT2)
    for i in gridT2:
        print(*i,sep='')

if __name__ == "__main__":
    main()
import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.readline  #文字列入力では注意！
from copy import deepcopy
from functools import lru_cache
N,M = map(int,input().split())
graph = [[] for _ in range(N)]
s = set()
for i in range(M):
    x,y = map(int,input().split())
    x -= 1; y -= 1
    s.add(y)
    graph[x].append(y)

@lru_cache(max = None)
def dfs(x):
    print(x,graph[x])
    if not graph[x]:
        return 0
    stack = deepcopy(graph[x])
    ret = 0
    while stack:
        now = stack.pop(0)
        ret = max(ret,dfs(now)+1)
    return ret

ans = 0
for i in range(N):
    if i not in s:
        ans = max(ans,dfs(i))
print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.readline  #文字列入力では注意！
from copy import deepcopy
from functools import lru_cache
N,M = map(int,input().split())
graph = [[] for _ in range(N)]
s = set()
for i in range(M):
    x,y = map(int,input().split())
    x -= 1; y -= 1
    s.add(y)
    graph[x].append(y)

@lru_cache(maxsize = None)
def dfs(x):
    if not graph[x]:
        return 0
    stack = deepcopy(graph[x])
    ret = 0
    while stack:
        now = stack.pop(0)
        ret = max(ret,dfs(now)+1)
    return ret

ans = 0
for i in range(N):
    if i not in s:
        ans = max(ans,dfs(i))
print(ans)