CodeEff/ECCO huggingface dataset:
# Original solution
import sys
input=lambda: sys.stdin.readline().rstrip()
mod=10**9+7
n=int(eval(input()))
edge=[[] for i in range(n)]
for i in range(n-1):
  a,b=list(map(int,input().split()))
  edge[a-1].append(b-1)
  edge[b-1].append(a-1)
inf=10**6
Par=[inf]*n
Par[0]=-1
Deg=[0]*n
Deg[0]=0
Chk=[0]
while Chk:
  c=Chk.pop()
  for next in edge[c]:
    if Par[next]==inf:
      Par[next]=c
      Deg[next]+=1
      Chk.append(next)

from collections import deque
TS=list(v for v in range(n) if Deg[v]==0)
D=deque(TS)
while D:
  v=D.popleft()
  for t in edge[v]:
    if t!=Par[v]:
      Deg[t]-=1
      if Deg[t]==0:
        D.append(t)
        TS.append(t)

Used=[False]*n
C=[0]*n
for i in reversed(list(range(n))):
  v=TS[i]
  Used[v]=True
  for g in edge[v]:
    if not Used[g]:
      C[g]+=C[v]+1

H=[0]*n
H[0]=1
H[1]=pow(2,mod-2,mod)
for i in range(2,n):
  H[i]=(H[i-1]*H[1])%mod

ans=0
for i in range(n):
  if len(edge[i])==1:
    continue
  else:
    A=[]
    for e in edge[i]:
      if e==Par[i]:
        A.append(n-1-C[i])
      else:
        A.append(C[e]+1)
    cur=1+(len(edge[i])-1)*H[-1]
    for a in A:
      cur-=H[n-1-a]
    ans=(ans+cur)%mod
print(((ans*H[1])%mod))


# Optimized solution
import sys
input=lambda: sys.stdin.readline().rstrip()
mod=10**9+7
n=int(eval(input()))
edge=[[] for i in range(n)]
for i in range(n-1):
  a,b=list(map(int,input().split()))
  edge[a-1].append(b-1)
  edge[b-1].append(a-1)
inf=10**6
Par=[inf]*n
Par[0]=-1
Deg=[0]*n
Deg[0]=0
Chk=[0]
while Chk:
  c=Chk.pop()
  for next in edge[c]:
    if Par[next]==inf:
      Par[next]=c
      Deg[next]+=1
      Chk.append(next)

from collections import deque
TS=list(v for v in range(n) if Deg[v]==0)
D=deque(TS)
while D:
  v=D.popleft()
  for t in edge[v]:
    if t!=Par[v]:
      Deg[t]-=1
      if Deg[t]==0:
        D.append(t)
        TS.append(t)

Used=[False]*n
C=[0]*n
for i in reversed(list(range(n))):
  v=TS[i]
  Used[v]=True
  for g in edge[v]:
    if not Used[g]:
      C[g]+=C[v]+1

H=[0]*n
H[0]=1
H[1]=pow(2,mod-2,mod)
for i in range(2,n):
  H[i]=(H[i-1]*H[1])%mod

ans=0
for i in range(n):
  if len(edge[i])==1:
    continue
  else:
    A=[]
    for e in edge[i]:
      if e==Par[i]:
        A.append(n-1-C[i])
      else:
        A.append(C[e]+1)
    cur=1+(len(edge[i])-1)*H[-1]
    for a in A:
      cur-=H[n-1-a]
    ans+=cur
print(((ans*H[1])%mod))
# Original solution
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)
mod = 10 ** 9 + 7

N = int(eval(input()))
edge = [[] for _ in range(N + 1)]
for _ in range(N - 1):
    x, y = list(map(int, input().split()))
    edge[x].append(y)
    edge[y].append(x)

# 頂点iから伸びてる枝それぞれのサイズ
memo = [[] for _ in range(N + 1)]


def dfs(s, p=-1):
    sub_tree = []
    res = 1
    for t in edge[s]:
        if t == p:
            continue
        size = dfs(t, s)
        sub_tree.append(size)
        res += size
    if N != res:
        sub_tree.append(N - res)
    memo[s].extend(sub_tree)
    return res


dfs(1)


cnt = 0
for lis in memo[1:]:
    if len(lis) == 1:
        continue
    # 頂点iが穴あきとならない->頂点から伸びてるやつ1つだけ黒の場合がダメ
    tmp = pow(2, N - 1, mod) - 1  # ぜんぶ白の場合を引いとく
    for x in lis:
        black = pow(2, x, mod) - 1
        tmp = (tmp - black + mod) % mod
    cnt = (cnt + tmp) % mod

div = pow(2, N, mod)
ans = cnt * pow(div, mod - 2, mod) % mod
print(ans)

# Optimized solution
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)
mod = 10 ** 9 + 7

N = int(eval(input()))
edge = [[] for _ in range(N + 1)]
for _ in range(N - 1):
    x, y = list(map(int, input().split()))
    edge[x].append(y)
    edge[y].append(x)

# 頂点iから伸びてる枝それぞれのサイズ
memo = [[] for _ in range(N + 1)]


def dfs(s, p=-1):
    res = 1
    for t in edge[s]:
        if t == p:
            continue
        size = dfs(t, s)
        memo[s].append(size)
        res += size
    if N != res:
        memo[s].append(N - res)
    return res


dfs(1)


cnt = 0
for lis in memo[1:]:
    if len(lis) == 1:
        continue
    # 頂点iが穴あきとならない->頂点から伸びてるやつ1つだけ黒の場合がダメ
    tmp = pow(2, N - 1, mod) - 1  # ぜんぶ白の場合を引いとく
    for x in lis:
        black = pow(2, x, mod) - 1
        tmp = (tmp - black + mod) % mod
    cnt = (cnt + tmp) % mod

div = pow(2, N, mod)
ans = cnt * pow(div, mod - 2, mod) % mod
print(ans)
# Original solution
h,w,*a=open(0).read().split();b=a.index("snuke");print(([chr(i)for i in range(65,91)][b%int(w)]+str(b//int(w)+1)))

# Optimized solution
h,w,*a=open(0).read().split();b=a.index("snuke");print((chr(b%int(w)+65)+str(b//int(w)+1)))
# Original solution
import sys
import itertools

def one_step(lo,lis):
    nu = [ e for e in lis ]
    for j in range(len(nu)):
        if lo[0][j] == 1:
            nu[j],nu[j+1] = nu[j+1],nu[j]
    return lo[1:],nu

def solve(lo,lis):
    if len(lo) == 0:
        return lis
    nu = [ e for e in lis]
    lo2,nu2 = one_step(lo,nu)
    return solve(lo2,nu2)

while True:
    n = eval(input())
    if n == 0: exit()
    m = eval(input())
    star = eval(input())
    d = eval(input())
    lis = list(range(n+1))
    lots = []
    for i in range(d):
        lots.append( [0] + list(map(int,input())) + [0])
    if solve(lots,lis)[star] == m: print(0);continue
    for i,j in itertools.product(range(d),range(1,n)):
        if lots[i][j-1] + lots[i][j] + lots[i][j+1] == 0:
            lots[i][j] = 1
            if solve(lots,lis)[star] == m: print(i+1,j);break
            lots[i][j] = 0
    else: print(1)

# Optimized solution
import sys
import itertools

def one_step(lo,lis):
    nu = [ e for e in lis ]
    for j in range(len(nu)):
        if lo[0][j] == 1:
            nu[j],nu[j+1] = nu[j+1],nu[j]
    return lo[1:],nu

def solve(lo,lis):
    if len(lo) == 0:
        return lis
    nu = [ e for e in lis]
    lo2,nu2 = one_step(lo,nu)
    return solve(lo2,nu2)

def func(lots,lis,n,m,star,d):
    for i in range(d):
        for j in range(1,n):
            if lots[0][j-1] + lots[0][j] + lots[0][j+1] == 0:
                lots[0][j] = 1
                if solve(lots,lis)[star] == m: print(i+1,j);return True
                lots[0][j] = 0
        lots,lis = one_step(lots,lis)
    return False

while True:
    n = eval(input())
    if n == 0: exit()
    m = eval(input())
    star = eval(input())
    d = eval(input())
    lis = list(range(n+1))
    lots = []
    for i in range(d):
        lots.append( [0] + list(map(int,input())) + [0])
    if solve(lots,lis)[star] == m: print(0);continue
    elif func(lots,lis,n,m,star,d): continue
    else: print(1)
# Original solution
import math

n=int(eval(input()))
a=[int(eval(input())) for _ in range(n)]
if n==1:
  print((a[0]))
elif n==2:
  print((a[0]*a[1]//math.gcd(a[0],a[1])))
else:
  r=a[0]*a[1]//math.gcd(a[0],a[1])
  for i in a:
    r=r*i//math.gcd(r,i)
  print(r)

# Optimized solution
import math

n=int(eval(input()))
a=[int(eval(input())) for _ in range(n)]
r=a[0]
for i in a:
  r=r*i//math.gcd(r,i)
print(r)
# Original solution
import math

a=[int(eval(input())) for _ in range(int(eval(input())))]
r=a[0]
for i in range(len(a)):
  r=r*a[i]//math.gcd(r,a[i])
print(r)

# Optimized solution
import math
n=int(eval(input()));a=[int(eval(input())) for _ in range(n)];r=a[0]
for i in a: r=r*i//math.gcd(r,i)
print(r)
# Original solution
N=int(eval(input()))
s=[int(eval(input())) for i in range(N)]
i=0
while i>=0 :
    i+=1
    for j in range(N):
        if (max(s)*i)%s[j]!=0:
            break
    else:
        print((max(s)*i))
        exit()

# Optimized solution
def f(a,b):
    x,y=a,b
    while b>0:
        a,b=b,a%b
    return (x//a)*y
s=1    
N=int(eval(input()))
for i in range(N):
    a=s
    b=int(eval(input()))
    s=f(a,b)
print(s)
# Original solution
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return list(map(int, input().split()))
sys.setrecursionlimit(10**9)

N = int(eval(input()))
from math import gcd

ans = 1
for i in range(N):
    t = int(eval(input()))
    g = gcd(ans, t)
    ans = ans*t//g

print(ans)

# Optimized solution
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return list(map(int, input().split()))
sys.setrecursionlimit(10**9)

N = int(eval(input()))
from math import gcd
g = 0
ans = 1
for _ in range(N):
    t = int(eval(input()))
    g = gcd(t, ans)
    ans = t*ans//g
print(ans)
# Original solution
n = int(eval(input()))
t = []
for i in range(n):
    t.append(int(eval(input())))

t = sorted(t)[::-1]
biggest = t[0]
for i in range(biggest, 10**18+1, biggest):
    ok = True
    for j in t[1:]:
        if i%j != 0:
            ok = False
            break
    if ok == True:
        break
    
print(i)
            

# Optimized solution
n = int(eval(input()))
t = []
for i in range(n):
    t.append(int(eval(input())))
    
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b)

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

result = 1
for i in range(n):
    result = lcm(result, t[i])
    
print(result)
# Original solution
def lcm(a, b):
    ax = a
    bx = b
    c = 0
    if a<b:
        ax, bx = (bx, ax)
    while True:
        if ax%bx == 0:
            gcd = bx
            break
        else:
            c = bx
            bx = ax%bx
            ax = c
    return a*b // gcd

n = int(eval(input()))
Mx = int(eval(input()))
lst = [Mx]
lst2 = []
for i in range(n-1):
    a = int(eval(input()))
    if Mx%a != 0:
        lst.append(a)
        lst.sort()
        if Mx<a:
            Mx = a

while True:
    y = len(lst)
    for i in range(y-1):
        lst2.append(lcm(lst[i], lst[i+1]))
    x = len(lst2)
    if x==1:
        print((lst2[0]))
        break
    lst.clear()
    for i in range(x-1):
        lst.append(lcm(lst2[i], lst2[i+1]))
    y = len(lst)
    if y==1:
        print((lst[0]))
        break
    lst2.clear()

# Optimized solution
def lcm(a, b):
    ax = a
    bx = b
    if a<b:
        ax, bx = (bx, ax)
    while True:
        if ax%bx == 0:
            gcd = bx
            break
        else:
            c = bx
            bx = ax%bx
            ax = c
    return a*b // gcd

n = int(eval(input()))
lst = []
lst2 = []
for i in range(n):
    a = int(eval(input()))
    lst.append(a)

while True:    
    if n==1:
        print((lst[0]))
        break
    lst2.append(lcm(lst[0], lst[1]))
    lst.pop(0)
    lst.pop(0)
    lst2.extend(lst)
    if len(lst2)==1:
        print((lst2[0]))
        break
    lst.clear()
        
    lst.append(lcm(lst2[0], lst2[1]))
    lst2.pop(0)
    lst2.pop(0)
    lst.extend(lst2)
    if len(lst)==1:
        print((lst[0]))
        break
    lst2.clear()
# Original solution
def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
n = int(eval(input()))
res = int(eval(input()))
while n > 1:
	x = int(eval(input()))
	res = (res * x) // gcd(res, x);
	n -= 1
print(res)

# Optimized solution
def gcd(a,b):
    while b > 0:
        a, b = b, a % b
    return a
    
n = int(eval(input()))
s = 1
for i in range(n):
    x = int(eval(input()))
    s = s // gcd(s, x) * x
print((int(s)))
# Original solution
def gcd(a,b):
    if b==0:
        return a
    return (gcd(b,a%b))
def lcm(a,b):
    return a*b//gcd(a,b)
n=int(eval(input()))
if n==1:
    print((int(eval(input()))))
    exit()
ans=1
for i in range(n):
    ans=lcm(ans,int(eval(input())))
print((int(ans)))

# Optimized solution
def gcd(a,b):
    if b==0:
        return a
    return (gcd(b,a%b))
def lcm(a,b):
    return a*b//gcd(a,b)
n=int(eval(input()))
t=[int(eval(input())) for i in range(n)]
if n==1:
    print((t[0]))
    exit()
ans=1
for i in t:
    ans=lcm(ans,i)
print((int(ans)))
# Original solution
import math
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)

n = int(eval(input()))

l = []

for i in range(n):
    t = int(eval(input()))
    l.append(t)

print((lcm_list(l)))


# Optimized solution
def gcd(m, n):
    if m < n:
        m, n = n, m

    while True:
        r = m % n
        if r == 0:
            return n
        else:
            m, n = n, r

def lcm(m, n):
    return m*n // gcd(m, n)

n = int(eval(input()))
l = []

ans = 1

for i in range(n):
    t = int(eval(input()))
    ans = lcm(ans, t)

print(ans)
# Original solution
n = int(eval(input()))
T = [int(eval(input())) for _ in range(n)]

main_t = max(T)
cur = main_t
flag = True
while 1:
	for t in T:
		if cur%t != 0:
			flag = False
			break
	if flag:
		ans = cur
		break
	cur += main_t
	flag = True
	# print(cur)

print(ans)

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

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

ans = 1
for t in T:
	ans = ans*t//gcd(ans,t)
print(ans)
# Original solution
n = int(eval(input()))
t = []
for i in range(n):
    t.append(int(eval(input())))
i = 0
while True:
    i+=1
    flag = True
    for j in range(n):
        if (i*max(t))%t[j] != 0:
            break
        if j == n-1:
            flag = False
    if flag == False:
        break
print((i*max(t)))

# Optimized solution
def gcd(a, b):
    while b:
        a, b = b, a%b
    return a
N = int(eval(input()))
ans = 1
for i in range(0,N):
    t = int(eval(input()))
    ans = t * ans // gcd(ans, t)
print(ans)
# Original solution
from math import gcd

def lcm(X, Y):  # 最小公倍数
    return (X * Y) // gcd(X, Y)


n = int(eval(input()))
t = [int(eval(input())) for _ in range(n)]

ans = 1
for i in t:
    ans = lcm(ans, i)
print(ans)


# Optimized solution
from math import gcd

def lcm(X, Y):
    return (X * Y) // gcd(X, Y)

n = int(eval(input()))
t = [int(eval(input())) for _ in range(n)]

ans = 1
for i in t:
    ans = lcm(ans, i)
print(ans)
# Original solution
import sys
from functools import reduce

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

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

n, *t = list(map(int, sys.stdin.read().split()))

def main():
    return reduce(lcm, t)

if __name__ == '__main__':
    ans = main()
    print(ans)

# Optimized solution
import sys

def gcd(a, b): return gcd(b, a % b) if b else abs(a)
def lcm(a, b): return abs(a // gcd(a, b) * b)

n, *t = list(map(int, sys.stdin.read().split()))

def main():
    res = 1
    for x in t:
        res = lcm(res, x)
    print(res)

if __name__ ==  '__main__':
    main()
# Original solution
from functools import reduce

n = int(eval(input()))
t = [int(eval(input())) for _ in range(n)]


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


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


def lcmm(l):
    return reduce(lcm, l)


print((lcmm(t)))


# Optimized solution
from functools import reduce

n = int(eval(input()))
t = [int(eval(input())) for _ in range(n)]


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


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


def lcmm(l):
    return reduce(lcm, l)


print((lcmm(t)))
# Original solution
def f(x,y):
    if x<y: x,y = y,x
    if y==0: return x
    else: return f(y, x%y)
N = int(eval(input()))
ans = 1
for _ in range(N):
    T = int(eval(input()))
    ans = ans*T//f(ans,T)
print(ans)

# Optimized solution
N = int(eval(input()))
T = [int(eval(input())) for i in range(N)]
def gcd(x,y):
    if x<y:x,y = y,x
    if y==0:return x
    return gcd(y,x%y)
S = T[0]
for i in range(1,N):
    S = S*T[i]//gcd(S,T[i])
print(S)
# Original solution
n = int(eval(input()))
T=[int(eval(input())) for i in range(n)]
T = sorted(T,reverse=True)

a = T[0]
i =1
while True:
  if sum([T[0]%x for x in T]) !=0:
    T[0] += a
  else:
    print((T[0]))
    exit()
  i += 1

# Optimized solution
n = int(eval(input()))
T=[int(eval(input())) for i in range(n)]


def euclid(a,b):
  r = a % b
  return euclid(b,r) if r else b

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

num = T[0]
for i in range(1,n):
  num = lcm(num, T[i])
print(num)
# Original solution
from collections import deque
N = int(eval(input()))
T = sorted(list(set([int(eval(input())) for _ in range(N)])), reverse=True)
ret = 1
while len(T) > 1:
  C = int(max(T) ** 0.5)
  f = False
  for c in range(2, C + 1):
    T_ = deque([])
    for i, t in enumerate(T):
      if t % c == 0:
        T_.append(t // c)
        f = True
      elif t < c:
        ret *= t
      else:
        T_.append(t)
    T = sorted(list(set([t for t in T_ if t >= c])), reverse=True)
    if f:
      ret *= c
      break
  else:
    break
for t in T:
  ret *= t
print(ret)

# Optimized solution
from collections import deque
N = int(eval(input()))
T = list(set([int(eval(input())) for _ in range(N)]))
ret = T[0]

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

for t in T[1:]:
  ret = ret * t // gcd(ret, t)
  
print(ret)
# Original solution
from collections import deque
N = int(eval(input()))
T = list(set([int(eval(input())) for _ in range(N)]))
ret = T[0]

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

for t in T[1:]:
  ret = ret * t // gcd(ret, t)
  
print(ret)

# Optimized solution
import sys
input = sys.stdin.readline
N = int(eval(input()))

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

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

T = int(eval(input()))
for i in range(N-1):
    T_ = int(eval(input()))
    T = lcm(T, T_)

print(T)
# Original solution
N = int(eval(input()))
L = [ int(eval(input())) for i in range(N)]

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

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

x = L[0]
for i in range(len(L)-1):
    y = lcm(x, L[i+1])
    x = y
    
print(x)

# Optimized solution
#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)

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

tmp = L[0]
for i in range(1, N):
    tmp = lcm(tmp, L[i])
    
print(tmp)
# Original solution
def p(n):
	ans = 0
	v = n
	while True:
		if n % 10:
			v = n
			break
		ans += 1
		n /= 10
	return ans

def vp(n):
	v = n
	while True:
		if n % 10:
			v = n
			break
		n //= 10
	return v

def lcm(x, y):
	if x > y:
		d = p(x)
		z = vp(x)
	else:
		d = p(y)
		z = vp(x)
	x = vp(x)
	y = vp(y)
	ans = 0
	while True:
		if z % x == 0 and z % y == 0:
			ans = z
			break
		z += 1
	return ans * 10**d

def resolve():
	n = int(eval(input()))
	T = []
	for _ in range(n):
		T.append(int(eval(input())))
	ans = 1
	for i in range(n):
		ans = lcm(ans, T[i])
	print(ans)
resolve()

# Optimized solution
def gcd(a, b):
	"""Compute the greatest common divisor of a and b"""
	while b > 0:
		a, b = b, a % b
	return a

def lcm(a, b):
	"""Compute the lowest common multiple of a and b"""
	return a * b // gcd(a, b)

def resolve():
	n = int(eval(input()))
	T = []
	for _ in range(n):
		T.append(int(eval(input())))
	ans = 1
	for i in range(n):
		ans = lcm(ans, T[i])
	print((int(ans)))
resolve()
# Original solution
def gcd(a, b):
	"""Compute the greatest common divisor of a and b"""
	while b > 0:
		a, b = b, a % b
	return a

def lcm(a, b):
	"""Compute the lowest common multiple of a and b"""
	return a * b // gcd(a, b)

def resolve():
	n = int(eval(input()))
	T = []
	for _ in range(n):
		T.append(int(eval(input())))
	ans = 1
	for i in range(n):
		ans = lcm(ans, T[i])
	print((int(ans)))
resolve()

# Optimized solution
def gcd(a, b):
	"""Compute the greatest common divisor of a and b"""
	while b > 0:
		a, b = b, a % b
	return a

def lcm(a, b):
	"""Compute the lowest common multiple of a and b"""
	return a * b // gcd(a, b)

def resolve():
	n = int(eval(input()))
	ans = int(eval(input()))
	for _ in range(n-1):
		ans = lcm(ans, int(eval(input())))
	print(ans)
resolve()
# Original solution
N = int(eval(input()))


def gcd(a, b):
    tmp_a, tmp_b = a, b
    a = max(tmp_a, tmp_b)
    b = min(tmp_a, tmp_b)
    r = a % b
    while r > 0:
        a = b
        b = r
        r = a % b
    return b
    

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


tmp = 1
for i in range(N):
    T = int(eval(input()))
    ans = lcm(T, tmp)
    tmp = ans

print(ans)


# Optimized solution
N = int(eval(input()))


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

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


tmp = 1
for i in range(N):
    T = int(eval(input()))
    ans = lcm(T, tmp)
    tmp = ans

print(ans)
# Original solution
N = int(eval(input()))

A = []
for i in range(N):
  A.append(int(eval(input())))

Amax = max(A)

i = 1
while i * Amax <= 1e18:
  fl = False
  for a in A:
    if i * Amax % a != 0:
      fl = True
      break
  if fl:
    i += 1
    continue
  else:
    break

print((i*Amax))

# Optimized solution
N = int(eval(input()))

A = []
for i in range(N):
  A.append(int(eval(input())))

def GCD(a,b):
  if a < b:
    a, b = b, a
  while b > 0:
    a, b = b, a%b
  
  return a

def LCM(a,b):
  return a*b // GCD(a,b)

lcm = A[0]
for i in range(1,N):
  lcm = LCM(lcm, A[i])

print(lcm)
# Original solution
N = int(eval(input()))
T = sorted([int(eval(input())) for i in range(N)])

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

if N == 1:
    print((T[0]))
else:
    ans = T[0]
    for i in range(1, N):
        ans = (ans*T[i])//(gcd(ans, T[i]))
    
    print(ans)

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

N = int(eval(input()))
A = [int(eval(input())) for i in range(N)]

ans = A[0]

for i in A:
    ans = (ans*i)//gcd(ans, i)
print(ans)
# Original solution
N = int(eval(input()))
a = [int(eval(input())) for x in range(N)]

ans = max(a)
mx = max(a)
iteration = 1 
while (ans <= 1000000000000000000):
    flag = True 
    for item in a:
        if not (ans%item == 0):
           flag = False
    if flag:
        print(ans)
        break
    else:
        iteration = iteration + 1
        ans = iteration * mx

# Optimized solution
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
 
def lcm(a, b):
    return a * b // gcd(a,b)
 
N = int(eval(input()))
Ts = []
c = 1
for i in range(N):
    c = lcm(c, int(eval(input())))
 
print((int(c)))
# Original solution
# -*- coding: utf-8 -*-

N = int(input().strip())
T_list = [int(input().strip()) for _ in range(N)]
#-----

def gcd(a,b):
    x = max(a,b)
    y = min(a,b)

    while y != 0:
        r = x % y
        
        x = y
        y = r
    
    return x

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


ans = T_list[0]
for i in T_list[1:]:
    ans = lcm(ans, i)

print(ans)


# Optimized solution
# -*- coding: utf-8 -*-

N = int(input().strip())
T_list = [int(input().strip()) for _ in range(N)]
#-----

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

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


ans = T_list[0]
for i in T_list[1:]:
    ans = lcm(ans, i)

print(ans)
# Original solution
def gcd(n, m):
    # 最大公約数
    a = max(n,m)
    b = min(n,m)
    while b:
        a, b = b, a % b
    return a
lcd = 1

N = int(eval(input()))
ts = [int(eval(input())) for i in range(N)]

for t in ts:
    lcd = (lcd*t)//gcd(lcd,t)

print(lcd)

# Optimized solution

N = int(eval(input()))
ts = [int(eval(input())) for i in range(N)]

def lcd(n, m):
    # 最小公倍数
    a = max(n,m)
    b = min(n,m)
    while b:
        a, b = b, a % b
    return n*m//a

ans = 1
for t in ts:
    ans = lcd(ans,t)
print(ans)