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

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
#input = lambda: sys.stdin.readline().strip()
#◆◆◆◆◆◆提出前には上の#を削除する◆◆◆◆◆◆
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
 
    N, M = NMI()
    AB = [NLI() for _ in range(M)]
    
    #各頂点の遡った親が同じなら、同じグループ
    parents = [i for i in range(N+1)] # 最初は自分自身が親。
 
    
    def find_parent(x):#ある子の親を探す
        if parents[x] == x:#自分自身が親ならそれでいい
            return parents[x]
        else:
            parents[x] = find_parent(parents[x])#親の値を親の親の…親に書き換える
            return parents[x]
    
    
    def unite_children(x,y):#親を同じにする
        parent_x = find_parent(x)
        parent_y = find_parent(y)
        if parent_x == parent_y:#すでに親が同じなら何もしない
            return
        parents[x] = y

 
        
    for m in range(M):
        a = AB[m][0]
        b = AB[m][1]
        
        if a > b:
            a,b = b,a
        
        unite_children(a,b)

    
    for m in range(1,M+1):
        parents[m] = find_parent(m)

    del parents[0]
    pa = collections.Counter(parents)
    
    print(pa.most_common()[0][1])
 

 
 
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict
 
sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()
 
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()
 
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n
 
    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
 
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
 
        if x == y:
            return
 
        if self.parents[x] > self.parents[y]:
            x, y = y, x
 
        self.parents[x] += self.parents[y]
        self.parents[y] = x
 
    def size(self, x):
        return -self.parents[self.find(x)]
 
    def same(self, x, y):
        return self.find(x) == self.find(y)
 
    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]
 
    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]
 
    def group_count(self):
        return len(self.roots())
 
    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}
 
    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())
    
def main():
    
    N, M = NMI()
    
    uf = UnionFind(N)
    
    for m in range(M):
        A,B = NMI()
        uf.union(A-1, B-1)
 
    ans = 0
    for n in range(N):
        ans = max(ans,uf.size(n))
    print(ans)
 
 

if __name__ == '__main__':
    main()
kuku=[]
for i in range(1,10):
  for j in range(1,10):
    kuku.append(i*j)
  
a=int(input())
if a in kuku:
  print("Yes")
else:
  print("No")
  

### FIXED CODE ###

a = input().split(" ")
if int(a[0]) <= 9 and int(a[1]) <= 9:
  print(int(a[0])*int(a[1]))
else:
  print(-1)
def InnerRating(N, R):
  if N >= 10:
    return R
  else:
    return R + 100 * (10 - N)
  
N, R = map(int, input())
print (InnerRating(N, R))

### FIXED CODE ###

def InnerRating(N, R):
  if N >= 10:
    return R
  else:
    return R + 100 * (10 - N)
  
N, R = map(int, input().split())
print (InnerRating(N, R))
n = int(input())
t, a = map(int, input().split())
t *= 1000
a *= 1000
lst = list(map(int, input().split()))
tmp = abs(t - 6 * lst[0] - a)
tmpa = 0
for i in range(1, n):
    temp = abs(t - 6 * lst[i] - a)
    if temp < tmp:
        tmp = tmp
        tmpa = i
print(tmpa + 1)
n = int(input())
t, a = map(int, input().split())
t *= 1000
a *= 1000
lst = list(map(int, input().split()))
tmp = abs(t - 6 * lst[0] - a)
tmpa = 0
for i in range(1, n):
    temp = abs(t - 6 * lst[i] - a)
    if temp < tmp:
        tmp = temp
        tmpa = i
print(tmpa + 1)


### FIXED CODE ###

n = int(input())
t, a = map(int, input().split())
t *= 1000
a *= 1000
lst = list(map(int, input().split()))
tmp = abs(t - 6 * lst[0] - a)
tmpa = 0
for i in range(1, n):
    temp = abs(t - 6 * lst[i] - a)
    if temp < tmp:
        tmp = temp
        tmpa = i
print(tmpa + 1)
n = int(input())
a = [0]*(10**4)
for i in range(1,101):
    for j in range(1,101):
        for  k in range(1,101):
            try:
                a[i*i+j*j+k*k+i*j+j*k+i*k]+=1
            except:
                continue
for i in range(1, n+1):
    print(a[i])

### FIXED CODE ###

n = int(input())
a = [0]*((10**4)+1)
for i in range(1,101):
    for j in range(1,101):
        for  k in range(1,101):
            try:
                a[i*i+j*j+k*k+i*j+j*k+i*k]+=1
            except:
                continue
for i in range(1, n+1):
    print(a[i])
a = input()
b = input()
c = a * b
if c % 2 == 0：
	print("Even)
else:
	print("Odd")
      

### FIXED CODE ###

a, b = map(int, input().split())
if (a * b) % 2 == 0:
  print('Even')
else:
  print('Odd')
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *

import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

if __name__ == '__main__':
    a,b = map(int,input().split())

    list = [0]*a

    for i in range(b):
        n,m=map(int, input().split())
        list[n-1]+=1
        list[m-1]+=1
    for i in list:
        print(i)

### FIXED CODE ###

import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    if a[2] >=a[0] and a[2] <=a[1]:
        print("Yes")
    else:
        print("No")
A=[]
for i in range(5):
    B=int(input())
    A.append(B)
min=1000
for j in range(5):
    if A[j]%10!=0 and A[j]%10<min:
        min=A[j]%10
        index=j
time=0
for k in range(len(A)):
    if k!=index:
        time=time+A[k]
        if A[k]%10!=0:
            time=time+(10-A[k]%10)
    else:
        time=time+A[k]
print(time)


### FIXED CODE ###

A=[]
for i in range(5):
    B=int(input())
    A.append(B)
min=1000
count=0
for j in range(5):
    if A[j]%10!=0 and A[j]%10<min:
        min=A[j]%10
        index=j
    if A[j]%10==0:
        count+=1
if count==5:
    index=0
time=0
for k in range(len(A)):
    if k!=index:
        time=time+A[k]
        if A[k]%10!=0:
            time=time+(10-A[k]%10)
    else:
        time=time+A[k]
print(time)
import sys

N, K= map(int, input().split())
S = input()

ones_list = S.split('0')
zeros_list = S.split('1')

ones = []
if S[0] == '0':
    ones.append(0)
for k in range(len(ones_list)):
    if ones_list[k] != '':
        ones.append(len(ones_list[k]))
if S[-1] == '0':
    ones.append(0)

zeros = []
for k in range(len(zeros_list)):
    if zeros_list[k] != '':
        zeros.append(len(zeros_list[k]))

if K >= len(zeros):
    print(len(S))
    sys.exit

if (len(zeros) == 0) | (len(ones) == 0):
    print(len(S))
    sys.exit

result = []
maximum = 0
for k in range(K):
    maximum += ones[k]
    maximum += zeros[k]
maximum += ones[K]
result.append(maximum)


for j in range(len(ones) - K - 1):
    maximum += zeros[K+j] + ones[K+1+j] - ones[j] - zeros[j]
    result.append(maximum)
print(max(result))

### FIXED CODE ###

import sys

N, K= map(int, input().split())
S = input()

ones_list = S.split('0')
zeros_list = S.split('1')

ones = []
if S[0] == '0':
    ones.append(0)
for k in range(len(ones_list)):
    if ones_list[k] != '':
        ones.append(len(ones_list[k]))
if S[-1] == '0':
    ones.append(0)

zeros = []
for k in range(len(zeros_list)):
    if zeros_list[k] != '':
        zeros.append(len(zeros_list[k]))

if K >= len(zeros):
    print(len(S))
    sys.exit()

result = []
maximum = 0
for k in range(K):
    maximum += ones[k]
    maximum += zeros[k]
maximum += ones[K]
result.append(maximum)


for j in range(len(ones) - K - 1):
    maximum += zeros[K+j] + ones[K+1+j] - ones[j] - zeros[j]
    result.append(maximum)
print(max(result))
import collections
n, k, q = map(int, input().split())
A = [int(input()) for _ in range(q)]
a_c = collections.Counter(A)
cnt = 0
x = ['No'] * n
if q-k < 0:
	for a in range(n):
		print('Yes')
	exit()
for i,j in a_c.items():
  if j > q-k:
    x[i-1] = 'Yes'
for k in x:
	print(k)

### FIXED CODE ###

import heapq

n, m = map(int, input().split())
lis = []

for i in input().split():
  heapq.heappush(lis, -int(i))

for j in range(m):
  tmp = -heapq.heappop(lis)
  heapq.heappush(lis, -int((tmp/2)))

print(-sum(lis))
import numpy as np
import itertools
N, K = [int(_) for _ in input().split()]
XYC = []
b = np.zeros((2 * K, 2 * K), dtype=int)
for _ in range(N):
    x, y, c = input().split()
    x = int(x)
    y = int(y)
    if c == 'W':
        y += K
    dy = 2 * K * (y // (2 * K))
    y -= dy
    x -= dy
    x %= 2 * K
    b[x, y] += 1
    b[(x + K) % (2 * K), y + K] += 1
c = np.pad(b, [(1, 0), (1, 0)], 'constant')
acc = c.cumsum(axis=0).cumsum(axis=1)
ans = max(acc[i + K, j + K] - acc[i, j + K] - acc[i + K, j] + acc[i, j]
          for i, j in itertools.product(range(K), range(K)))
print(ans)


### FIXED CODE ###

import itertools
import numpy as np
N, K, *XYC = open(0).read().split()
N = int(N)
K = int(K)
board = np.zeros((4 * K + 1, 4 * K + 1), dtype=np.uint16)
for x, y, c in zip(XYC[::3], XYC[1::3], XYC[2::3]):
    x = int(x)
    y = int(y)
    if c == 'W':
        x += K
    x = x % (2 * K)
    y = y % (2 * K)
    board[x, y] += 1
    board[(x + K) % (2 * K), (y + K) % (2 * K)] += 1
board[1 + 2 * K:, 1 + 2 * K:] = board[:2 * K, :2 * K]
board[1:1 + 2 * K, 1 + 2 * K:] = board[1 + 2 * K:, 1 + 2 * K:]
board[1 + 2 * K:, 1:1 + 2 * K] = board[1 + 2 * K:, 1 + 2 * K:]
board[1:1 + 2 * K, 1:1 + 2 * K] = board[1 + 2 * K:, 1 + 2 * K:]
board[0, :] = 0
board[:, 0] = 0
for j in range(1, 1 + 4 * K):
    board[:, j] += board[:, j - 1]
for j in range(1, 1 + 4 * K):
    board[j, :] += board[j - 1, :]
ans = np.max(board[K:3 * K, K:3 * K] + board[:2 * K, :2 * K] -
             board[:2 * K, K:3 * K] - board[K:3 * K, :2 * K])
print(ans)
import string
def main():
    s = input()
    if s == "zyxwvutsrqponmlkjihgfedcba":
        print(-1)
        return
    for i in "abcdefghijklmnopqrstuvwxyz@":
        if i == "@":
            t = 0
            for x in range(len(s)-1, 0, -1):
                for y in range(x-1, -1, -1):
                    if x == y:
                        continue
                    if s[x] > s[y]:
                        print(s.translate(string.maketrans(s[x],x[y])))
                        return 
        if s.count(i) == 0:
            print (s + i)
            break

main()



### FIXED CODE ###

import string

alp = string.ascii_lowercase

def main():
    s = input()
    if len(s) < 26:
        for i in alp:
            if i not in s:
                print (s + i)
                return
    if s == alp[::-1]:
        print(-1)
        return
    L = len(s)
    tmp = []
    tt = ''
    for i, ss in enumerate( s ):
        tmp += [ s[L-i-1] ]
        if s[L-i-1] > s[L-i-2]:
            ans = s[:L-i-2]
            tt = s[L-i-2] 
            break
    tmp.sort()
    for i in tmp:
        if i > tt:
            print (ans + i)
            break
main()
n,k = map(int,input().split())
a = list(map(int,input().split()))
a = sorted(a,reverse=true)
for i in range(min(n,k)):
  pop(0)
print(sum(a))

### FIXED CODE ###

n,k = map(int,input().split())
a = list(map(int,input().split()))
a = sorted(a,reverse=True)
del a[:min(n,k)]
print(sum(a))
import math
A, B = map(int, input().split())
def lcm(x, y):
  return (x * y) // math.gcd(x, y)

print(lcm(A, B))

### FIXED CODE ###

import fractions
A, B = map(int, input().split())
print((A * B) // fractions.gcd(A, B))
n=int(input())
L=[[] for i in range(n)]
for i in range(n-1):
    u,v,w=map(int, input().split())
    u-=1
    v-=1
    L[u].append([v,w])
    L[v].append([u,w])
ans=[-1]*n
ans[0]=0
from collections import deque
que=deque([])
que.append(0)
while que:
    v=que.popleft()
    for u, w in L[v]:
        if ans[u]!=-1:
            continue
        ans[u]=(ans[v]+w)%2
        que.append(u)
for a in ans:
    print(a)

### FIXED CODE ###

n, k = list(map(int, input().split()))
a = input()
tmp = ""
for i in range(n):
    t = a[i]
    if i == k-1:
        t = t.lower()
    tmp += t
print(tmp)
S = input()
T = input()

if S.length < 1 || 10 < S.length:
  return 'No'
elif S.length+1 == T.length:
  if S+T[T.length-1] == T:
    return 'Yes'
  else:
    return 'No'
else:
  return 'No'

### FIXED CODE ###

S = input()
T = input()

if len(S) < 1 or 10 < len(S):
  print('No')
elif len(S)+1 == len(T):
  if S+T[len(T)-1] == T:
    print('Yes')
  else:
    print('No')
else:
  print('No')
def main():
    from itertools import combinations_with_replacement
    from math import ceil
    d, g, *pc = map(int, open(0).read().split())
    p, c = pc[::2], pc[1::2]
    ans = 0
    l = range(d)
    for x in combinations_with_replacement(l, d):
        y = list(set(x))
        tmp = g
        count = 0
        for i in y:
            tmp -= (i + 1) * 100 * p[i] + c[i]
            count += p[i]
        if tmp >= g:
            ans = min(ans, count)
        else:
            j = max(y)
            if j == d - 1:
                j -= 1
            else:
                j += 1
            k = ceil(tmp / (100 * (j + 1)))
            if k < p[j]:
                count += k
                ans = min(ans, count)

    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    from math import ceil
    d, g, *pc = map(int, open(0).read().split())
    p, c = pc[::2], pc[1::2]

    ans = sum(p)

    for i in range(2 ** d - 1):
        tmp = g
        count = 0
        # i は集合の表現 ex 1001101
        for j in range(d):
            # iのj桁目が1はどうか
            if i >> j & 1:
                # process
                tmp -= (c[j] + 100 * (j + 1) * p[j])
                count += p[j]

        j = d - 1
        while i >> j & 1:
            j -= 1

        if tmp <= 0:
            ans = min(ans, count)
            continue
        else:
            k = ceil(tmp / ((j + 1) * 100))
            if k >= p[j]:
                continue
            else:
                count += k
                ans = min(count, ans)

    print(ans)


if __name__ == '__main__':
    main()
def gcd(x, y):
    if x % y:
        return gcd(y, x % y)
    return y

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

n = int(input())
a = sorted([int(i) for i in input().split()], reverse=True)
l = a[0]
for i in a[1:]:
    l = lcm(l, i)
print(sum(map(lambda x: (l - 1) % x, a)))


### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
print(sum(a) - n)
H, N = map(int, input())
skills_sum = sum(map(int, input()))
print("Yes" if H-skills_sum <= 0 else "No")

### FIXED CODE ###

H, N = map(int, input().split())
skills_sum = sum(map(int, input().split()))
print("Yes" if H-skills_sum <= 0 else "No")
N = int(input())
c = -1
s = 0
for i in range(N):
    ai,bi = map(int,input().split())
    s += ai
    if ai > bi:
        if c == -1:
            c = bi
        if bi < c:
            c = bi
if c == -1:
    print(0)
else:
    print(s-c)


### FIXED CODE ###

x = list(map(int,input().split()))
x.sort()
a = x[2]-x[0]
b = x[2]-x[1]

if a%2 == 0 and b%2 == 0:print(a//2+b//2)
if a%2 == 0 and b%2 == 1:print(a//2+(b+1)//2+1)
if a%2 == 1 and b%2 == 0:print((a+1)//2+b//2+1)
if a%2 == 1 and b%2 == 1:print((a-1)//2+(b-1)//2+1)
n = int(input())
if n % 2 == 0:
    a = n // 2
else:
    a = n // 2 + 1

print(a/n)


### FIXED CODE ###

n, k = map(int, input().split())
H = list(map(int, input().split()))
ans = 0
for h in H:
    if h >= k:
        ans += 1
print(ans)
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

H, W, K = map(int, input().split())
Upper = H//2 if H % 2 == 1 else H//2+1
for h in range(Upper):
    w = (K-W*h)/(H-2*h)
    if int(w) == w and 0 <= w <= W:
        print("Yes")
        exit()
print("No")


### FIXED CODE ###

# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

H, W, K = map(int, input().split())
for h in range(H+1):
    for w in range(W+1):
        if (W-w)*h+(H-h)*w == K:
            print("Yes")
            exit()
print("No")
n = int(input())

a = list(range(1, n+1))
b = a[1:] + [a[0]]

ans = 0
for i, j in zip(a, b):
    ans += (i % j)
print(ans)


### FIXED CODE ###

n = int(input())

ans = n * (n - 1) // 2
print(ans)
a, b, c = input().split()

print("{}-{}+{}".format(c,a,b)

### FIXED CODE ###

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

print(c-min(a-b,c))
# coding: utf-8
#-------------------------------------------------------------------
#-------------------------------------------------------------------
import sys
def p(*a):
  s=" ".join(map(str,a))
  #print(s)
  sys.stderr.write(s+"\n")
#-------------------------------------------------------------------
import math
def prm(n, r):
	return math.factorial(n)//math.factorial(n-r)

def cmb(n, r):
	return prm(n, r)//math.factorial(r)
#-------------------------------------------------------------------
def v(k):
	#p("B-1, k-1, cmb", B-1, k-1, cmb(B-1, k-1))
	p("R, k, cmb(R, k)",R, k, cmb(R, k))
#-------------------------------------------------------------------


N, K = map(int, input().split())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7

B=K
R=N-K

A =[0]*(N+1)
AS=[0]*(N+1)




def calc(i):
	r = cmb(R+1, i)
	b = cmb(B-1, i-1)
	return r*b

for i in range(1,K+1):
	#v(i)
	print(calc(i))
	#print(A[i])






### FIXED CODE ###

# coding: utf-8
#-------------------------------------------------------------------
#-------------------------------------------------------------------
import sys
def p(*a):
  s=" ".join(map(str,a))
  #print(s)
  sys.stderr.write(s+"\n")
#-------------------------------------------------------------------
import math
def prm(n, r):
	return math.factorial(n)//math.factorial(n-r)

def cmb(n, r):
	return prm(n, r)//math.factorial(r)
#-------------------------------------------------------------------
def v(k):
	#p("B-1, k-1, cmb", B-1, k-1, cmb(B-1, k-1))
	p("R, k, cmb(R, k)",R, k, cmb(R, k))
#-------------------------------------------------------------------
MOD = 10**9+7
#-------------------------------------------------------------------


N, K = map(int, input().split())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7

B=K
R=N-K


def calc(i):
	r = cmb(R+1, i) % MOD
	b = cmb(B-1, i-1) % MOD
	return (r * b) % MOD

for i in range(1,K+1):
	if R+1>=i:
		print( calc(i) )
	else:
		print(0)
n, a, b = map(int, input().split())

s = ''

while (len(s) <= n):
    s += 'b' * a
    s += 'r' * b

tmp = s[0:n]

print(tmp.count('b'))


### FIXED CODE ###

n, a, b = map(int, input().split())
tmp = (n % (a+b))

if a == 0:
    print('0')
elif tmp == 0:
    print(a * (n // (a+b)))
else:
    if tmp < a:
        print(a * (n // (a+b)) + tmp)
    else:
        print(a * (n // (a+b)) + a)
import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j--
    x_list[j+1] = v
  for k in range(0, y):
    print x_list[k],
  print " "



y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

insertionSort(x_list, y)

### FIXED CODE ###

import sys

def insertionSort(x_list,y):
  for i in range(1, y):
    v = x_list[i]
    j = i - 1
    while j >= 0 and x_list[j] > v:
      x_list[j + 1] = x_list[j]
      j -= 1
    x_list[j+1] = v
    for k in range(0, y):
      print x_list[k],
    print

y = sys.stdin.readline()
y = int(y)

x = sys.stdin.readline()

x_list = x.split(" ")

for i in range(y):
  x_list[i] = int(x_list[i])

for k in range(0, y):
  print x_list[k],
print

insertionSort(x_list, y)
a,b,c,d=map(int,input().split())
print((((a-c)**2)+((b-d)**2))**.5)


### FIXED CODE ###

a,b,c,d=map(float,input().split())
dx=a-c
dy=b-d
dd=(dx*dx+dy*dy)**.5
print(dd)
def main():
    """"ここに今までのコード"""
    import sys
    input = sys.stdin.readline
    n,m=map(int,input().split())
    A=list(map(int,input().split()))
    A.sort()
    if n==1:
        ans=(m//(A[0]//2)+1)//2
        print(int(ans))
        exit()
    from fractions import gcd
    kou=A[0]*A[1]//gcd(A[0],A[1])
    for a in A:
        kou=A[a]*kou//gcd(a,kou)
        if (kou//a)%2==0:
            print(0)
            exit()
    kou//=2
    #print(kou)
    ans=(m//kou+1)//2
    print(int(ans))
if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    """"ここに今までのコード"""
    import sys
    input = sys.stdin.readline
    n,m=map(int,input().split())
    A=list(map(int,input().split()))
    #A.sort()
    if n==1:
        ans=(m//(A[0]//2)+1)//2
        print(int(ans))
        exit()
    from fractions import gcd
    kou=A[0]*A[1]//gcd(A[0],A[1])
    for a in A:
        kou=a*kou//gcd(a,kou)
        if (kou//a)%2==0:
            print(0)
            exit()
    kou//=2
    #print(kou)
    ans=(m//kou+1)//2
    print(int(ans))
if __name__ == '__main__':
    main()
from math import gcd
from itertools import permutations

N = 3
a = [12, 15, 18]

l = set(gcd(x, y) for x, y in list(permutations(a, 2)))
if 1 in l:
    remove(1)
print(min(l))

### FIXED CODE ###

from fractions import gcd
from itertools import accumulate

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

b = list(accumulate([0] + a, gcd))
c = list(accumulate([0] + a[::-1], gcd))
l = list(gcd(s, t) for s, t in zip(b[:-1], c[::-1][1:]))
print(max(l))
seen = [0,0,0,0,0,0,0,0,0]
seen[0],seen[1],seen[2] = (map(int,input().split()))
seen[3],seen[4],seen[5] = (map(int,input().split()))
seen[6],seen[7],seen[8] = (map(int,input().split()))
over = False
N = int(input())
for x in range(N):
  num = int(input())
  print(num)
  if num in seen:
    seen[x] = "O"
print(seen)
if seen[0] == "O":
  if seen[1] == seen[2] == "O":
    over = True
  elif seen[3] == seen[6] == "O":
    over = True
  elif seen[4] == seen[8] == "O":
    over = True
elif seen[4] == "O":
  if seen[2] == seen[6] == "O":
    over = True
  elif seen[1] == seen[7] == "O":
    over = True
  elif seen[3] == seen[5] == "O":
    over = True
elif seen[8] == "O":
  if seen[6] == seen[7] == "O":
    over = True
  if seen[2] == seen[5] == "O":
    over = True
if not over:
  print("NO")
else:
  print("YES")

### FIXED CODE ###

seen = [0,0,0,0,0,0,0,0,0]
seen[0],seen[1],seen[2] = (map(int,input().split()))
seen[3],seen[4],seen[5] = (map(int,input().split()))
seen[6],seen[7],seen[8] = (map(int,input().split()))
over = "No"
N = int(input())
for x in range(N):
  num = int(input())
  if num in seen:
    seen[seen.index(num)] = "O"
if seen[0] == "O":
  if seen[1] == "O" and seen[2] == "O":
    over = "Yes"
  if seen[3] == "O" and seen[6] == "O":
    over = "Yes"
  if seen[4] == "O" and seen[8] == "O":
    over = "Yes"
if seen[8] == "O":
  if seen[6] == "O" and seen[7] == "O":
    over = "Yes"
  if seen[2] == "O" and seen[5] == "O":
    over = "Yes"
if seen[4] == "O":
  if seen[6] == "O" and seen[2] == "O":
    over = "Yes"
  if seen[1] == "O" and seen[7] == "O":
    over = "Yes"
  if seen[3] == "O" and seen[5] == "O":
    over = "Yes"
print(over)