Harryxun/stf_run huggingface dataset:
import fractions
 
N, X = map(int, input().split())
x = list(map(int, input().split()))
x.sort()

dist = []
for i in range(N-1):
    dist.append(x[i+1] - x[i])
    
g = dist[0]

for i in range(N-2):
    g = fractions.gcd(g, dist[i+1])

print(g)

### FIXED CODE ###

N, X = map(int, input().split())
x = list(map(int, input().split()))
x = list(map(lambda x: abs(X - int(x)), x))

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)
        
if len(x) < 2:
    print(x[0])
else:
    D = gcd(x[0], x[1])
    for i in range(2, N):
        D = gcd(D, x[i])

    print(D)
if __name__ == '__main__':
  z = input()
  num_list = input()
  count = 0
  for i in range(z-3):
    hoge = num_list[i:i+3]
    hoge_sort = hoge.sort()
    if hoge[1]=hoge_sort[1]:
      count += 1
  print(count)

### FIXED CODE ###

if __name__ == '__main__':
  
  z = int(input())
  if 20 >= z and z >= 3:
    num_list = list(map(int, input().strip().split()))
    count = 0
    for i in range(z-2):
      hoge = num_list[i:i+3]
      hoge_sort = sorted(hoge)
      if hoge[1]==hoge_sort[1]:
        count += 1
    print(count)
age,money=map(int, input().split())
assert 1<=age<=100 and 2<=b<=1000 and b%2==0
if age<=5:
    print('0')
elif 6<=age<=12:
    print(money/2)
else:
    print(money)


### FIXED CODE ###

try:
    age,money=map(int, input().split())
    assert 0<=age<=100 and 2<=money<=1000 and money%2==0
    if age<=5:
        print('0')
    elif 6<=age<=12:
        print(money//2)
    else:
        print(money)
except AssertionError:
    print('')
import sys
sys.setrecursionlimit(10**9)
from collections import defaultdict,deque
import bisect
input = sys.stdin.readline
N = int(input())
a = list(map(int,input().split()))

g = defaultdict(list)
for i in range(N-1):
    u, v = map(int,input().split())
    g[u].append(v)
    g[v].append(u)

dq = deque([1])
euler = [1]
visited = [False]*(N+1)

inf = 10**10
l = [inf] * (N+1)


lis = [0] * (N+1)
lis[1] = 1

def f(v,l):
    if visited[v]:
        return
    visited[v] = True
    i = bisect.bisect_right(l,a[v-1])
    l[i] = a[v-1]
    lis[v] = l.index(inf) - 1
    for nv in g[v]:
        if not visited[nv]:
            f(nv,l[:])

l = [inf] * (N+1)
l[0] = a[0]
f(1,l)

for i in range(1,N+1):
    print(lis[i])







### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)
from collections import defaultdict,deque
import bisect
input = sys.stdin.readline

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

g = defaultdict(list)
for i in range(N-1):
    u, v = map(int,input().split())
    g[u].append(v)
    g[v].append(u)

def eulerTour(g,s):
    n = len(g)
    dq = [s]
    ls = [-1]*(n+1)
    rs = [-1]*(n+1)
    index = []
    visited = [False]*(n+1)
    def dfs(v):
        visited[v] = True
        ls[v] = len(index)
        index.append(v)
        for nv in g[v]:
            if not visited[nv]:
                dfs(nv)
        rs[v] = len(index)
        index.append(v)
    dfs(s)
    return ls,rs,index

ls,rs,index = eulerTour(g,1)
dq = deque([1])
visited = [False]*(N+1)

inf = 10**10
l = [inf] * (N+1)

ans = [0] * (N+1)
ans[1] = 1

visited = [False]*(N+1)
rollback = []

k = 1
for v in index:
    if visited[v]:
        i, pa = rollback.pop()
        l[i] = pa
        if pa == inf:
            k -= 1
    else:
        A = a[v-1]
        i = bisect.bisect_left(l,A)
        rollback.append((i,l[i]))
        if k <= i:
            k += 1
        l[i] = A
        #ans[v] = l.index(inf)
        ans[v] = k
        visited[v] = True


for i in range(1,N+1):
    print(ans[i])
n = int(input())
a = list(map(int, input().split()))
dp = [[[-1] * (10 ** 4) for _ in range(80)] for _ in range(2)]
dp[0][0][1000] = 0
dp[1][0][1000] = 0
for i in range(n):
    for j in range(10 ** 4):
        dp[0][i + 1][j], dp[1][i + 1][j] = dp[0][i][j], dp[1][i][j]
    for j in range(10 ** 4):
        u, v = dp[0][i][j], dp[1][i][j]
        if max(u, v) < 0:
            continue
        dp[0][i + 1][j] = u
        dp[1][i + 1][j] = v
        # print(i, j, u, v)
        dp[0][i + 1][j + max(u, v) * a[i]] = 0
        dp[1][i + 1][j % a[i]] = max(u, v) + j // a[i]
ans = 0
for j in range(10 ** 4):
    if dp[0][n][j] != -1 or dp[1][n][j] != -1:
        ans = max(ans, j)
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
c = 1000
for i in range(1, n):
    if a[i] > a[i - 1]:
        c = c // a[i - 1] * a[i] + c % a[i - 1]
print(c)
N = int(input())
A = list(map(int,input().split()))
count_list = []
if len(list(set(A))) == 1:
    print("1")
else:
    for i in range(min(A) + 1,max(A)):
        count = A.count(i-1) + A.count(i) + A.count(i+1)
        count_list.append(count)
    print(max(count_list))

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
l = [0]*(10**5)
for e in A:
    if e == 0:
        l[0] += 1
        l[1] += 1
    elif e == 99999:
        l[99999] += 1
        l[99998] += 1
    else:
        l[e-1] += 1
        l[e] += 1
        l[e+1] += 1
print(max(l))
N, M = map(int, input().split())
sc = [map(int, input().split()) for _ in range(M)]
s, c = [list(i) for i in zip(*sc)]

def isOK(num):
    str_num = str(num)
    l = len(str_num)
    if l != N:
        return False
    for i in range(M):
        if str_num[s[i]-1] != str(c[i]):
            return False

    return True

ans = -1

for i in range(10**N):
    if isOK(i):
        ans = i
        break

print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
if M:
    sc = [map(int, input().split()) for _ in range(M)]
    s, c = [list(i) for i in zip(*sc)]

    def isOK(num):
        str_num = str(num)
        l = len(str_num)
        if l != N:
            return False
        for i in range(M):
            if str_num[s[i]-1] != str(c[i]):
                return False

        return True

    ans = -1

    for i in range(10**N):
        if isOK(i):
            ans = i
            break

    print(ans)
else:
    print(10**(N-1) if N != 1 else 0)
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 26 22:28:26 2020

@author: Kanaru Sato
"""

s = input()
n = len(s)
s = list(s)
dic = {}
mod = 2019
count = 0

for i in range(1,n+1):
    num = int(s[n-i:n])
    num %= mod
    if num in dic:
        count += 1
    if num not in dic:
        dic[num] = 1

if 0 in dic:
    count += 1

print(count)

### FIXED CODE ###

s = list(map(int, list(input())))
n = len(s)

countdic = {}
mod = 2019

num = 0
d = 1
for i in range(1,n+1):
    num += s[n-i]*d
    num %= mod
    if num in countdic:
        countdic[num] += 1
    if num not in countdic:
        countdic[num] = 1
    d = (10*d)%mod

ans = 0
for key in countdic:
    ans += countdic[key]*(countdic[key]-1)//2

if 0 in countdic:
    ans += countdic[0]

print(ans)
#!python3

import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

def resolve():
    it = map(int, sys.stdin.read().split())
    X = 19
    N, Q = next(it), next(it)
    X = max(N, Q).bit_length()
    b1, br, bc = (1 << X)-1, 2*X+1, 1<<X

    if Q == 3:
        raise 1

    Aa = [0] * N
    for i in range(N):
        ci = next(it)-1
        Aa[i] = ci
    Aq, Ac = [None] * Q, [0] * Q
    for i in range(Q):
        l, r = next(it)-1, next(it)-1
        Aq[i] = r<<X | i
        Ac[i] = l

    Aq.sort()
    dp = [0] * N

    N1 = (2*N+1)//2
    dp2 = [0] * (N1*2)

    ans = [0] * Q
    offset = 0
    for arg in Aq:
        r, i = arg >> X, arg & b1

        for j in range(offset, r+1):
            ci = Aa[j]

            lo = N1 + dp[ci]
            hi = N1 + j

            while lo < hi:
                if lo & 1:
                    dp2[lo] += 1
                    lo += 1
                if not hi & 1:
                    dp2[hi] += 1
                    hi -= 1
                lo >>= 1; hi >>= 1;

            if lo == hi: dp2[lo] += 1

            dp[ci] = j + 1
        else:
            offset = r+1
        l = Ac[i]

        num = 0
        j = l + N1
        while j > 0:
            num += dp2[j]
            j >>= 1
        ans[i] = num

    print(*ans, sep="\n")


if __name__ == "__main__":
    resolve()


### FIXED CODE ###

#!python3

import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

def resolve():
    it = map(int, sys.stdin.read().split())
    X = 19
    N, Q = next(it), next(it)
    X = Q.bit_length()
    b1, br, bc = (1 << X)-1, 2*X+1, 1<<X

    Aa = [next(it)-1 for i in range(N)]
    Aq = [0] * Q
    Ac = [0] * Q
    for i in range(Q):
        l, r = next(it)-1, next(it)-1
        Aq[i] = r<<X | i
        Ac[i] = l

    Aq.sort()
    dp = [0] * N

    N1 = (2*N+1)//2
    dp2 = [0] * (N1*2)

    ans = [0] * Q
    offset = 0
    for arg in Aq:
        r = arg >> X
        i = arg & b1

        for j in range(offset, r+1):
            ci = Aa[j]

            lo = N1 + dp[ci]
            hi = N1 + j

            while lo < hi:
                if lo & 1:
                    dp2[lo] += 1
                    lo += 1
                if not hi & 1:
                    dp2[hi] += 1
                    hi -= 1
                lo >>= 1; hi >>= 1;

            if lo == hi: dp2[lo] += 1

            dp[ci] = j + 1
        offset = r+1
        l = Ac[i]

        num = 0
        j = l + N1
        while j > 0:
            num += dp2[j]
            j >>= 1
        ans[i] = num

    print(*ans, sep="\n")


if __name__ == "__main__":
    resolve()
n = input()
if n >= 2 and n <= 200000
   for i in range(0, n-1):
      R = map(int, raw_input().split())
   minv = R[0]
   maxv = R[1] - R[0]
   for j in range(1, n-1):
      maxv = max(maxv, R[j] - minv) 
      minv = min(minv, R[j])
print maxv - minv

### FIXED CODE ###

n = input()
R = []
for i in range(0, n):
   R.append(int(raw_input()))

maxv = R[1] - R[0]
minv = R[0]

for v in range(1, n):
   if minv > R[v]:
      minv = R[v]
   elif maxv < R[v] - minv:
      maxv = R[v] - minv
print maxv
input(i)
print(i**3)

### FIXED CODE ###

x = input()
print(int(x)**3)
import sys
from heapq import heappush as hpu
from heapq import heappop as hpo
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

base = 10 ** 10
sb = [(-b[i], i) for i in range(N) if a[i] != b[i]]
h = []
push = lambda x,i: hpu(h, (-x,i))
for t in sb: push(t)
res = 0
while len(h):
  v, i = hpo(h)
  v = -v
  if v < a[i]:
    print(-1)
    exit(0)
  d = v - a[i]
  x = b[i - 1] + b[(i + 1) % N]
  t = d // x
  if t == 0:
    if v == a[i]: continue
    print(-1)
    exit(0)
  b[i] -= x * (t)
  res += t
  push((-b[i], i))
print(res)


### FIXED CODE ###

import sys
from heapq import heappush as hpu
from heapq import heappop as hpo
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

base = 10 ** 6
sb = [-(b[i] * base + i) for i in range(N) if a[i] != b[i]]
h = []
for t in sb: hpu(h, t)
res = 0
while len(h):
  v = hpo(h)
  i = -v % base
  v = -v // base
  if v < a[i]:
    print(-1)
    exit(0)
  d = v - a[i]
  x = b[i - 1] + b[(i + 1) % N]
  t = d // x
  if t == 0:
    if v == a[i]: continue
    print(-1)
    exit(0)
  b[i] -= x * (t)
  res += t
  hpu(h, -(b[i] * base + i))
print(res)
A, B = map(int(input()))

num = B / A

if B % A == 0:
  print(int(num))
else:
  print(int(num + 1))

### FIXED CODE ###

A, B = map(int,input().split())
num = B / A
i = 0
if B == 1:
  print(int(0))
else:
  while True:
    if B == 1:
        print(0)
        break
    if A * i - (i - 1) >= B:
        print(i)
        break
    i += 1
import math
s = input()
k = int(input())

i = 0
while i < len(s):
    if math.log(int(s[i])) * (500 * 10 **12 - 1) >= math.log(k):
#         print(i, s[i], int(s[i]) ** (500 * 10 *12))
        break
    i += 1
print(s[i])

### FIXED CODE ###

s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
else:
    i = 0
    while i < k - 1 and i < len(s):
        if s[i] != '1':
            break
        i += 1
    print(s[i])
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
 
MAXN = 1005
MAXV = MAXN*(MAXN-1)//2
 
to = [[] for _ in range(MAXV)]
id = [[[] for _ in range(MAXN)] for _ in range(MAXN)]
 
def toId(i, j):
    if i > j:
        i, j = j, i
    return id[i][j]
visited = [False] * MAXV
calculated = [False] * MAXN
dp = [1] * MAXV
 
def dfs(v):
    if visited[v]:
        if not calculated[v]:
            return -1
        return dp[v]
    visited[v] = True
    dp[v] = 1
 
    for u in to[v]:
        res = dfs(u)
        if res == -1: return -1
        dp[v] = max(dp[v], res+1)
    calculated[v] = True
    return dp[v]
 
def main():
    n = int(input())
    a = [[int(i) for i in readline().split()] for _ in range(n)]
    
    for i in range(n):
        for j in range(n-1):
            a[i][j] -= 1
    V = 0
    for i in range(n):
        for j in range(n):
            if i < j:
                id[i][j] = V
                V += 1
    
    for i in range(n):
        for j in range(n-1):
            a[i][j] = toId(i, a[i][j])
        for j in range(n-2):
            to[a[i][j+1]].append(a[i][j])
    
    ans = 0
    
    for i in range(V):
        res = dfs(i)
        if res == -1:
            print('-1')
            return
        ans = max(ans, res)
    print(ans)
    return
  
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
 
MAXN = 1005
MAXV = MAXN*(MAXN-1)//2
 
to = [[] for _ in range(MAXV)]
id = [[[] for _ in range(MAXN)] for _ in range(MAXN)]
 
def toId(i, j):
    if i > j:
        i, j = j, i
    return id[i][j]
visited = [False] * MAXV
calculated = [False] * MAXV
dp = [1] * MAXV
 
def dfs(v):
    if visited[v]:
        if not calculated[v]:
            return -1
        return dp[v]
    visited[v] = True
    dp[v] = 1
 
    for u in to[v]:
        res = dfs(u)
        if res == -1: return -1
        dp[v] = max(dp[v], res+1)
    calculated[v] = True
    return dp[v]
 
def main():
    n = int(input())
    a = [[int(i) for i in readline().split()] for _ in range(n)]
    
    for i in range(n):
        for j in range(n-1):
            a[i][j] -= 1
    V = 0
    for i in range(n):
        for j in range(n):
            if i < j:
                id[i][j] = V
                V += 1
    
    for i in range(n):
        for j in range(n-1):
            a[i][j] = toId(i, a[i][j])
        for j in range(n-2):
            to[a[i][j+1]].append(a[i][j])
    
    ans = 0
    
    for i in range(V):
        res = dfs(i)
        if res == -1:
            print('-1')
            return
        ans = max(ans, res)
    print(ans)
    return
  
if __name__ == '__main__':
    main()
N,M=map(int,input().split())
s=[]
c=[]
for i in range(M):
    a, b = map(int,input().split())
    s.append(a)
    c.append(b)

okflag = True

for i in range(M):

    if not okflag:
         break
    for j in range(M):
     if not okflag:
         break
     if not (i==j):

        if s[i]==s[j] and c[i]!=c[j]:

            okflag = False
            print("No")

if okflag:
    answer = ["0"] * N
    for i in range(M):
        answer[s[i]] = str(c[i])
    if not N == 1 and answer[0] == "0":
        answer[0] = "1"
    result = ''.join(answer)
    print(result)
    


### FIXED CODE ###

N,M=map(int,input().split())
s=[]
c=[]
for i in range(M):
    a, b = map(int,input().split())
    s.append(a)
    c.append(b)

okflag = True

for i in range(M):

    if not okflag:
         break
    for j in range(M):
     if not okflag:
         break
     if not (i==j):
        if s[i]==s[j] and c[i]!=c[j]:
            okflag = False
            print("-1")
if okflag:
    answer = ["x"] * N

    for i in range(M):
        answer[s[i]-1] = str(c[i])
    
    if N == 1 and answer[0] == "x":
        print("0")
    elif N == 1 and not answer[0] == "x":
        print(answer[0])

    elif not N == 1 and answer[0] == "0":
        print("-1")
    
    elif not N == 1:
        for i in range(N):
            if answer[i] == "x":
                if i == 0:
                    answer[i] = "1"
                else:
                    answer[i] = "0"
        result = ''.join(answer)
        print(result)
A ,B = [int(x) for x in input().split()]
C = [(int(x)+1)/2 for x in input().split()]
ans = 0
count = 0
D = [0]*A
sum = 0
for i in range(A):
    sum += C[i]
    D[i] = sum
    if i >= B:
        dif = sum[i] - D[i-B]
        if dif > ans:
            ans = dif
    
if A==B:
    ans=sum[A-1]
    
print(ans)


### FIXED CODE ###

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

total = 0
ans = 0
for i,a in enumerate(P):
    total += (a+1)/2
    if i >= k:
        total -= (P[i-k]+1)/2
    if i >= k-1:
        ans = max(total,ans)
    
print(ans)
H, W = map(int, input().split(" "))
result = True
masu = [["." for i in range(H+2)] for j in range(W+2)]
for h in range(1, H+1):
    s = "."+input()+"."
    masu[h] = list(s)
# print(masu)
for h in range(1, H+1):
    for w in range(1, W+1):
        # print(h, w, masu[h][w])
        if masu[h][w] == "#" and masu[h+1][w] != "#" and masu[h][w+1] != "#" and masu[h-1][w] != "#" and masu[h][w-1] != "#":
            result = False
            break
if result:
    print("Yes")
else:
    print("No")

### FIXED CODE ###


H, W = map(int, input().split(" "))

# result = True
masu = [['.' for i in range(W+2)] for j in range(H+2)]
for h in range(H):
    s = "."+input()+"."
    masu[h+1] = s

# print(masu)

for h in range(1,H+1):
    for w in range(1,W+1):
        if masu[h][w] == "#":
            if "#" == masu[h+1][w] or "#" == masu[h][w+1] or "#" == masu[h-1][w] or "#" == masu[h][w-1]:
                pass
            else:
                # result = False
                print("No")
                exit()

print("Yes")
import copy 

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

N = int(input())
T = list(map(int,input().split()))
T.sort()
LIS = [0]*N
LIS[0] += T[0]
for i in range(N-1):
    LIS[i+1] += gcd(LIS[i],T[i+1])
GCD = 0
GCD += LIS[N-1]
if N == 2:
    ANS = max(T[0],T[1])
else:
    #第１項がtarget
    S = copy.copy(T)
    S.pop(0)
    LS = [0]*(N-1)
    LS[0] += S[0]
    for i in range(N-2):
        LS[i+1] += gcd(LS[i],S[i+1])
    ANSA = LS[N-2]

    #その他の場合
    LJ = []
    for i in range(N-1):
        if LIS[i] != LIS[i+1]:
            LJ.append(i+1)

    LK = []
    for j in range(len(LJ)):
        U = copy.copy(T)
        U.pop(LJ[j])
        LS = [0]*(N-1)
        LS[0] += U[0]
        for i in range(N-2):
            LS[i+1] += gcd(LS[i],S[i+1])
        LK.append(LS[N-2])
    ANSB = max(LK)
    ANS = max(ANSA,ANSB)
print(ANS)

### FIXED CODE ###

import copy 

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

N = int(input())
T = list(map(int,input().split()))
T.sort()
LIS = [0]*N
LIS[0] += T[0]
for i in range(N-1):
    LIS[i+1] += gcd(LIS[i],T[i+1])
F = LIS.index(min(LIS))
if len(T) == 2:
    ANS = max(T[0],T[1])
elif F == 0:
    U = copy.copy(T)
    V = copy.copy(T)
    U.pop(1)
    V.pop(0)
    LU = [0]*(N-1)
    LU[0] = U[0]
    LV = [0]*(N-1)
    LV[0] = V[0]
    for i in range(N-2):
        LU[i+1] += gcd(LU[i],U[i+1])
    ANSU = LU[N-2]
    for i in range(N-2):
        LV[i+1] += gcd(LV[i],V[i+1])
    ANSV = LV[N-2]
    ANS = max(ANSU,ANSV)
    
else:
    U = copy.copy(T)
    V = copy.copy(T)
    U.pop(F)
    V.pop(0)
    LU = [0]*(N-1)
    LU[0] = U[0]
    LV = [0]*(N-1)
    LV[0] = V[0]
    ANSU = 0
    ANSV = 0
    for i in range(N-2):
        LU[i+1] += gcd(LU[i],U[i+1])
    ANSU = LU[N-2]
    for i in range(N-2):
        LV[i+1] += gcd(LV[i],V[i+1])
    ANSV = LV[N-2]
    ANSP = max(ANSU,ANSV)
    ANS = max(ANSP,LIS[N-1])
        
print(ANS)
S = input()
T = input()
cnt = []
ans = 1
fis1 = [index for index, word in enumerate(S) if S[i] == S[0]]
fis2 = [index for index, word in enumerate(T) if T[i] == T[0]]

if fis1 != fis2:
    ans = 0
else:
    for i in range(len(S)):
        if i not in fis1:
            kensa1 = [index for index, word in enumerate(S) if S[i] == word]
            kensa2 = [index for index, word in enumerate(T) if T[i] == word]
            if kensa1 != kensa2:
                ans = 0
                break
            else:
                fis1.append(kensa1)
    
print('Yes' if ans == 1 else 'No')

### FIXED CODE ###

S = input()
T = input()

used = []
res  = []

for i in range(len(S)):
    if S[i] not in used:
        used.append(S[i])
    res.append(used.index(S[i]))

#print(used)
#print(res)
used = []
ret = []

for i in range(len(T)):
    if T[i] not in used:
        used.append(T[i])
    ret.append(used.index(T[i]))

if res == ret:
    print('Yes')
else:
    print('No')
L,R = map(int,input().split())

if L-R > 2018:
    print(0)
else:
    minMod = 100000000
    for i in range(L,R):

        for j in range(i+1,R+1):
   
            if tmp == 0:
      			minMod = tmp
        		break
    		elif minMod > (i*j)%2019:
                minMod = (i*j)%2019
        	
    print(minMod)


### FIXED CODE ###

L,R = map(int,input().split())

if R-L > 672:
    print(0)
else:
    minMod = 2019
    for i in range(L,R):
        for j in range(i+1,R+1):
            tmp = (i*j)%2019
            if tmp == 0:
                minMod = 0
                break
            minMod = min(tmp,minMod)
    print(minMod)
N = int( input() )
T = [ int( input() ) for _ in range(N) ]


# 最小公倍数を求めたい
# aとbの最小公倍数 = a*b / aとbの最大公約数
# 最大公約数 (Greatest Common Divisor)
def GCD( a, b ):
    if b == 0: return a
    return GCD(b, a%b)

# 最小公倍数 (Least Common Multiple)
def LCM( a, b ):
    return a*b // GCD(a,b)


ans = LCM( T[0], T[1] )
for i in range(2,N): ans = LCM( ans, T[i] )
print( ans )

### FIXED CODE ###

import fractions
import functools

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

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

def lcm_list( numbers ):
    return functools.reduce( lcm, numbers, 1 )

if N == 1: print( T[0] )
else     : print( lcm_list(T) )
R, G, B, N = map(int, input().split())

ans = [0]*(N//R + 1)*(N//G + 1)*(N//B + 1)
for r in range(N//R + 1):
    for g in range(N//G + 1):
        for b in range(N//B + 1):
            k = r*R + g*G + b*B
            ans[k] += 1
print(ans)
print(ans[N])

### FIXED CODE ###

R, G, B, N = map(int, input().split())

ans = 0
for r in range(N//R + 1):
    for g in range((N - r*R)//G + 1):
        if (N - r*R - g*G)%B == 0:
                ans += 1
print(ans)
k = input()
s = input()
i = 0
l = int(k)
p = str()

while i < l:
    p = p + s[i]
    i = i + 1

if len(s) > l:
	print(p + '...')
else:
	print(p)


### FIXED CODE ###

k = input()
s = input()
i = 0
l = int(k)
p = str()
 
while i < l and len(s) > l:
    p = p + s[i]
    i = i + 1
while i < len(s) and len(s) <=l:
    p = p + s[i]
    i = i + 1
if len(s) > l:
	print(p + '...')
else:
	print(p)
A,B,C =map(int,input().split())
con = 0
if A % 2 == 1 or B % 2 == 1 or C % 1 == 1:
  print(0)
  exit()
if A == B and B == C:
  print(-1)
  exit()
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
  con += 1
  D = A / 2
  E = B / 2
  F = C / 2
  A = E + F
  B = D + F
  C = D + E
  
print(con)
A,B,C =map(int,input().split())
con = 0
if A % 2 == 1 or B % 2 == 1 or C % 1 == 0:
  print(0)
  exit()
if A == B and B == C:
  print(-1)
  exit()
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
  con += 1
  D = A / 2
  E = B / 2
  F = C / 2
  A = E + F
  B = D + F
  C = D + E
  
print(con)
提出情報

### FIXED CODE ###

A,B,C =map(int,input().split())
con = 0
if A % 2 == 1 or B % 2 == 1 or C % 1 == 1:
  print(0)
  exit()
if A == B and B == C:
  print(-1)
  exit()
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
  con += 1
  D = A / 2
  E = B / 2
  F = C / 2
  A = E + F
  B = D + F
  C = D + E
print(con)