Harryxun/stf_run huggingface dataset:
#!/usr/bin/env python3
def main():
    import sys

    sys.setrecursionlimit(10 ** 5)

    def dfs(now: int, chain: set):
        """nowを現在の頂点として，つながっている頂点をglaphに集合として記録"""
        if seen[now]:
            return chain
        seen[now] = i
        for next in friends[now]:
            chain.add(now)
            dfs(next, chain)

    N, M, K = map(int, input().split())
    AB = [tuple(map(int, input().split())) for _ in [0] * M]
    CD = [tuple(map(int, input().split())) for _ in [0] * K]

    friends = [set() for _ in [0] * (N + 1)]
    for f in AB:
        friends[f[0]].add(f[1])
        friends[f[1]].add(f[0])
    blocks = [set() for _ in [0] * (N + 1)]
    for b in CD:
        blocks[b[0]].add(b[1])
        blocks[b[1]].add(b[0])

    friends_chain = []
    seen = [0] * (N + 1)
    cnt = 1
    for i in range(1, N + 1):
        if not seen[i]:
            glaph = set()
            dfs(i, glaph)
            friends_chain.append(glaph)
            cnt += 1

    ans = [0] * (N + 1)
    for person in range(1, N + 1):
        res = set(friends_chain[seen[person] - 1])
        for block in blocks[person]:
            res.discard(block)
        for friend in friends[person]:
            res.discard(friend)
        ans[person] = len(res) - 1
    
    for hoge in ans[1:]:
        print(hoge, end=' ')


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
def main():
    from collections import deque

    N, M, K = map(int, input().split())
    friends = [set() for _ in range(N + 1)]
    for _ in range(M):
        a, b = map(int, input().split())
        friends[a].add(b)
        friends[b].add(a)
    blocks = [set() for _ in range(N + 1)]
    for _ in range(K):
        c, d = map(int, input().split())
        blocks[c].add(d)
        blocks[d].add(c)

    friends_chain = []
    seen = [-1] * (N + 1)
    cnt = 0
    for person in range(1, N + 1):
        if seen[person] != -1:
            continue
        q = deque([person])
        friends_chain.append(set(q))
        while q:
            now = q.pop()
            seen[now] = cnt
            for next in friends[now]:
                if seen[next] != -1:
                    continue
                friends_chain[-1].add(next)
                q.append(next)
        cnt += 1

    for person in range(1, N + 1):
        res = friends_chain[seen[person]]
        tmp_ans = len(res) - len(friends[person]) - 1
        for block in blocks[person]:
            tmp_ans -= 1 if block in res else 0
        print(tmp_ans, end=' ')


if __name__ == '__main__':
    main()
n,k=map(int,input().split())
a = input()
 
a = list(a)
a[k - 1] = a[k-1].lower()
a = "".join(a)
print(a)
 
127
a,b = map(int, input().split(" "))
if a >= 13 :
  print(b)
elif a >= 6 :
  print(b//2)
else:
  print(0)


### FIXED CODE ###

n,k=map(int,input().split())
a = input()
 
a = list(a)
a[k - 1] = a[k-1].lower()
a = "".join(a)
print(a)
X = int(input())
b = 1
c = True

while c:
    if ((X + b**5)**0.2).is_integer():
        c = False
        a = int(((X + b**5)**0.2))
    elif b > 0:
        b = -1*b
    else:
        b = -1*b + 1
        
print(a, b)

### FIXED CODE ###

X = int(input())

c = 1
result = False


while not result:
    for i in range(c):
        a = c -i
        b = i
        if a**5 - b**5 == X:
            result = True
            A = a
            B = b
            break
    if result == True:
        break
    for i in range(c):
        b = c - i
        a = - i
        if a**5 - b**5 == X:
            result = True
            A = a
            B = b
            break
    if result == True:
        break
    for i in range(c):
        a = -c+i
        b = -i
        if a**5 - b**5 == X:
            result = True
            A = a
            B = b
            break
    if result == True:
        break
    for i in range(c):
        a = i
        b = -c + i
        if a**5 - b**5 == X:
            result = True
            A = a
            B = b
            break
    if result == True:
        break
    c += 1

print(A, B)
a,b = map(int(input().split()))
print((a-1)*(b-1))


### FIXED CODE ###

a,b = map(int,input().split())
print((a-1)*(b-1))
N=int(input())
kuji=[list(map(str,input().split())) for i in range(N)] 
print(len(set(kuji)))

### FIXED CODE ###

N=int(input())
listA=[input() for i in range(N)]
listB=set(listA)
print(len(listB))
#!/usr/bin/env python
# coding: utf-8

# In[28]:


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


# In[29]:


def func(x, a, history, cnt):
#     print(x, a[x-1], history)
    if a[x-1] == 2:
        print(cnt)
    elif a[x-1] in history:
        print(-1)
    else:
        history.append(a[x-1])
        cnt += 1
        func(a[x-1], a, history, cnt)
func(1, a, [], 1)


# In[ ]:






### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[28]:


# N = int(input())
# a = []
# for i in range(N):
#     a.append(int(input()))


# In[30]:


# def func(x, a, history, cnt):
#     print(x, a[x-1], history)
#     if a[x-1] == 2:
#         print(cnt)
#     elif a[x-1] in history:
#         print(-1)
#     else:
#         history.append(a[x-1])
#         cnt += 1
#         func(a[x-1], a, history, cnt)
# func(1, a, [], 1)


# In[ ]:


n = int(input())
a = [int(input()) for _ in range(n)]
L = [0] * n
cnt = 0
i = 0
while True:
    if L[i] == 1:
        print(-1)
        break
    else:
        L[i] = 1
        i = a[i] - 1
        cnt += 1
        if i == 1:
            print(cnt)
            break
li = input().split()

if li[0]+li[1]+li[2] >= 22:
    print("bust")
else:
    print("win")


### FIXED CODE ###

a = list(map(int,input().split()))
if a[0]+a[1]+a[2] <= 21:
  print('win')
else:
  print('bust')
n = int(input)
p = list(map(int, input().split()))

v = sorted(p)
cou=0
for i in range(n):
    if p[i] != v[i]:
        cou+=1

if cou <= 2:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")
a, b = [int(input()) for i in range(2)]

if a % 2 == b % 2 == 1:
	print("Odd")
else:
	print("Even")

### FIXED CODE ###

a, b = [int(n) for n in input().split(" ")]

if a % 2 == b % 2 == 1:
	print("Odd")
else:
	print("Even")
N, K=input().split()

if (N+2)//3 >= K:
  print('YES')
else:
  print('NO')

### FIXED CODE ###

N, K=list(map(int,input().split()))
 
if (N+1)//2 >= K:
  print('YES')
else:
  print('NO')
N=int(input())
A=list(map(int, input().split()))
#1000

#1300
#35
L=[0]*N
if A[0]<A[1]:
    L[0]=1
    up=1
elif A[0]==A[1]:
    up==0
else:
    up=-1

for i in range(1,N):
    if i==N-1:
        L[i]=-1
        break
    if up==1:
        if A[i]>A[i+1]:
            up=-1
            L[i]=-1
    elif up==0:
        if A[i-1]<A[i]:
            L[i-1]=1
            up=1
        elif A[i-1]>A[i]:
            up=-1

    else:
        if A[i]<A[i+1]:
            up=1
            L[i]=1

#print(L)
now=1000
have=0
for i in range(len(L)):
    l=L[i]
    if l==1:
        have=now//A[i]
        now=now%A[i]
    elif l==-1:
        now+=A[i]*have
        have=0
print(now)

### FIXED CODE ###

N=int(input())
A=list(map(int, input().split()))
#1000

#1300
#35
L=[0]*N
if A[0]<A[1]:
    L[0]=1
    up=1
elif A[0]==A[1]:
    up=0
else:
    up=-1

for i in range(1,N):
    if i==N-1:
        L[i]=-1
        break
    if up==1:
        if A[i]>A[i+1]:
            up=-1
            L[i]=-1
    elif up==0:
        if A[i-1]<A[i]:
            L[i-1]=1
            up=1
        elif A[i-1]>A[i]:
            up=-1

    else:
        if A[i]<A[i+1]:
            up=1
            L[i]=1

#print(L)
now=1000
have=0
for i in range(len(L)):
    l=L[i]
    if l==1:
        have=now//A[i]
        now=now%A[i]
    elif l==-1:
        now+=A[i]*have
        have=0
print(now)
N=int(input())
for w in range(1,3501):
  for n in range(1,3501):
    if N*w*n%(4*w*n-N*n-N*w)==0:
      print(N*w*n//(4*w*n-N*n-N*w),w,n)
      break


### FIXED CODE ###

N=int(input())
flag=0
for w in range(1,3501):
  if flag==1:
    break
  for n in range(1,3501):
    if 4*w*n-N*n-N*w<=0:
      continue
    if N*w*n%(4*w*n-N*n-N*w)==0:
      print(N*w*n//(4*w*n-N*n-N*w),w,n)
      flag=1
      break
import statistics
import math


def main():
    n = int(input())
    x = list(map(int, input().split()))

    c = 0
    t = 0
    for i in range(n-1):
        c += 1/(i+1)
        t += c * (x[i+1]-x[i])
        t %= 10**9+7

    print(t * math.factorial(n-1) % (10**9+7))


main()


### FIXED CODE ###

import statistics
import math

MOD = 10**9+7


def main():
    n = int(input())
    x = list(map(int, input().split()))

    c = 0
    t = 0
    for i in range(n-1):
        c += pow(i+1, MOD-2, MOD)
        t += c * (x[i+1]-x[i])
        t %= MOD

    fact = math.factorial(n-1) % MOD
    print(t * fact % MOD)


main()
import sys

s = input()
for i in len(s):
  if i % 2 == 0:
    if s[i] == "R":
      print("No")
      sys.exit()
  else:
    if s[i] == "L":
      print("No")
      sys.exit()
print("Yes")

### FIXED CODE ###

import sys

s = input()
for i in range(len(s)):
  if i % 2 == 1:
    if s[i] == "R":
      print("No")
      sys.exit()
  else:
    if s[i] == "L":
      print("No")
      sys.exit()
print("Yes")
import sys

for i in sys.stdin:
    i = i.split(" ")
    x, y = int(i[0]),int(i[1])
    if x == y == 0: break
    elif x <= y:
       print('{0} {1}'.format(x, y))
    else:
       pritn('{0} {1}').format(y, x)

### FIXED CODE ###

import sys
 
for i in sys.stdin:
    i = i.split(" ")
    x, y = int(i[0]), int(i[1])
    if x == y == 0:
       break
    elif x <= y:
       print("{0} {1}".format(x, y))
    else:
       print("{0} {1}".format(y, x))
btns=input().split()
X=btns[0]
Y=btns[1]
Coins=0

for i in range(2):
    if X > Y:
        Coins+=X
        X -= 1
    else:
        Coins+=Y
        Y-=1

print(Coins)



### FIXED CODE ###

btns=input().split()
X=int(btns[0])
Y=int(btns[1])
Coins=0

for i in range(2):
    if X > Y:
        Coins+=X
        X -= 1
    else:
        Coins+=Y
        Y-=1

print(Coins)
import sys
a, b = map(int, input().split())
s = input()
flag = 0
for i in range(len(a + b - 1)):
    if (s[a]) == '-': flag = True
    if (s[not a] == '-'):
        print('No')
        sys.exit()
print('Yes') if flag else print('No')


### FIXED CODE ###

a, b = map(int, input().split())
s = input()
flag = True
if (s[a] != '-'): flag = False
for i in range(a + b - 1):
    if (i == a): pass
    elif s[i] == '-': flag = False
print('Yes') if flag else print('No')
n = int(input())
red = []
blue = []

for i in range(n):
    a, b = map(int,input().split())
    red.append([a,b])
    

for i in range(n):
    c, d = map(int,input().split())
    blue.append([c,d])
    
red_sort = list(reversed(sorted(red, key=lambda y: y[1])))
blue_sort = sorted(blue, key=lambda x: x[0])

# print(red_sort)
# [[1, 3], [2, 0], [3, 1]]
# print(blue_sort)
# [[4, 2], [0, 4], [5, 5]]

pair = []
for blue_point in blue_sort:
    x_blue = blue_point[0]
    y_blue = blue_point[1]
    
    for red_point in red_sort:
        x_red = red_point[0]
        y_red = red_point[1]
        
        if x_red<x_blue and y_red<y_blue:
            if not (red point in pair) and not (red point in pair):
                pair.append(red_point)
                pair.append(blue_point)
    
print(len(pair) // 2)

### FIXED CODE ###

n = int(input())
red = []
blue = []

for i in range(n):
    a, b = map(int,input().split())
    red.append([a,b])
    

for i in range(n):
    c, d = map(int,input().split())
    blue.append([c,d])
    
red_sort = list(reversed(sorted(red, key=lambda y: y[1])))
blue_sort = sorted(blue, key=lambda x: x[0])

# print(red_sort)
# [[1, 3], [2, 0], [3, 1]]
# print(blue_sort)
# [[4, 2], [0, 4], [5, 5]]

pair = []
for blue_point in blue_sort:
    x_blue = blue_point[0]
    y_blue = blue_point[1]
    
    for red_point in red_sort:
        x_red = red_point[0]
        y_red = red_point[1]
        
        if x_red<x_blue and y_red<y_blue:
            if not (red_point in pair) and not (blue_point in pair):
                pair.append(red_point)
                pair.append(blue_point)
    
print(len(pair) // 2)
a=[print(I) for I in sorted([int(input()) for i in range(10)])[:-4:-1]]

### FIXED CODE ###

a=[]
for i in range(10):
    a.append(input())
a.sort()
a=a[::-1]
a=a[:3]
print(a[0])
print(a[1])
print(a[2])
n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[]
  y=[]
  for j in range(a):
    x,y=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
c=0
for i in range(n):
  l=[1]*n
  for j in range(i, n-i):
    if l[j]==0:continue
    for k in range(A[j]):
      b=X[j][k]
      l[b] *= Y[j][k]
if c<l.count(1):
  c=l.count(1) 
  
        
  
print(c)  
   

### FIXED CODE ###

n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[0]*a
  y=[0]*a
  for j in range(a):
    x[j],y[j]=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
s=0
for i in range(2**n):
  c=0
  d=0
  B=[0]*n
  for j in range(n):
    if((i >> j) & 1):
      c=c+1
      B[j]=1
  for k in range(n):
    if B[k]==1:
      for j in range(A[k]):
        if Y[k][j]!=B[X[k][j]-1]:
          d=-1
          break
    if d<0:
      break
  if s<c and d==0:
    s=c
      
      
print(s)
from fractions import gcd
from functools import reduce

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

N, M = map(int,input().split())
A = set(list(map(int,input().split())))
if len(A) == 1:
    lcmA = A[0]
else:
    lcmA = reduce(lcm, A)

n = lcmA
while n % 2 == 0:
    n //= 2
if n == 1:
    print(0)
else:
  print( 1 + (M - n)//(2*n))




### FIXED CODE ###

import fractions
import functools

def lcm(n1, n2):
    return n1 * n2 // fractions.gcd(n1, n2)

N, M = map(int, input().split())
A = list(map(int, input().split()))
for i in range(N):
    A[i] //= 2

lcmA = functools.reduce(lcm, A)
gcdA = functools.reduce(fractions.gcd, A)
if (lcmA // gcdA) % 2 == 0:
    print(0)
else:
    print((M // lcmA + 1) // 2)
N = int(input())
a = []*N
for _ in range(N):
	a.append(list(map(int,input().split())))
def prob(N,a):
	if N==1:
		ans = max(a[0][0],a[0][1],a[0][2])
		if ans==a[0][0]:
			click = 0
		elif ans==a[0][1]:
			click = 1
		elif ans==a[0][2]:
			click = 2
		return [ans, click]

	rec = prob(N-1, a)
	if rec[1] == 0:
		ans = rec[0] + max(a[N-1][1],a[N-1][2])
		if a[N-1][1]>a[N-1][2]:
			click = 1
		else:
			click = 2
		return [ans,click]

	if rec[1] == 1:
		ans = rec[0] + max(a[N-1][0],a[N-1][2])
		if a[N-1][0]>a[N-1][2]:
			click = 0
		else:
			click = 2
		return [ans,click]

	if rec[1] == 2:
		ans = rec[0] + max(a[N-1][0],a[N-1][1])
		if a[N-1][0]>a[N-1][1]:
			click = 0
		else:
			click = 1
		return [ans,click]

l = prob(N,a)
print(l[0])


### FIXED CODE ###

N = int(input())
arr = []*N
for _ in range(N):
	arr.append(list(map(int,input().split())))

dp = [0,0,0]
for a in arr:
	dp = [a[0]+max(dp[1],dp[2]),a[1]+max(dp[0],dp[2]),a[2]+max(dp[0],dp[1])]

print(max(dp))
import math

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

if n==m-1 or n==m+1:
  print((math.factorial(m)*math.factorail(n))%(1e9+7))
elif n==m:
  print((2*(math.factorail(m)**2))%(1e9+7))
else:
  print(0)

### FIXED CODE ###

import math

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

if n==m+1 or n==m-1:
    print((math.factorial(m)*math.factorial(n))%(10**9+7))
elif n==m:
    print((2*(math.factorial(m)**2))%(10**9+7))
else:
    print(0)
s = [input() for i in range(2)]

s_length = len(s[0])
s2_length = len(s[1])

if s2_length==s_length+1 and s[0]==s[1][:s_length]:
    print("Yes")
else:
    print("NO")_l

### FIXED CODE ###

s = [input() for i in range(2)]

s_length = len(s[0])
s2_length = len(s[1])

if s2_length==s_length+1 and s[0]==s[1][:s_length]:
    print("Yes")
else:
    print("No")
from collections import defaultdict as dd
N = int(input())
S = []
for i in range(N):
    s = input()
    s = sorted(s)
    s = ''.join(s)
    S.append(s)

SS = sorted(list(set(S)))
SN = []
for i in range(len(SS)):
    SN.append(S.count(SS[i]))
    if i < len(SS) - 1:
        j = S.index(SS[i+1])
        S = S[j:]


res = 0
for sn in SN:
    res += sn * (sn - 1) // 2

print(res)

### FIXED CODE ###

def main():
    N = int(input())
    S = []
    for i in range(N):
        s = input()
        s = sorted(s)
        s = ''.join(s)
        S.append(s)
    S.sort()
    SS = sorted(list(set(S)))
    SN = []
    M = len(SS)
    l = 0
    r = len(S)
    for i in range(M):
        for j in range(l, r):
            if S[j] != SS[i]:
                r = j
                break
        SN.append(r - l)
        l = r
        r = len(S)        

    res = 0
    for sn in SN:
        res += sn * (sn - 1) // 2

    print(res)
if __name__ == "__main__":
    main()
import copy

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

a = [0] + a + [0]

for i in range(n):
  my_sum = 0
  l = copy.copy(a)
  del l[i+1]
  for j in range(n):
    my_sum += abs(l[j] - l[j+1])
   print(my_sum)

### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]

A.insert(0,0)
A.append(0)

S = 0

for i in range(1,N+2):
    S += abs(A[i]-A[i-1])

for i in range(1,N+1):
    print(S + abs(A[i-1]-A[i+1]) - abs(A[i-1]-A[i]) - abs(A[i]-A[i+1]))
#import numpy as np

N = int(input())
A = list(map(int, input().split()))
A.sort()#わるほう

kouho = sorted([x for x in set(A) if A.count(x) == 1])
#maxA = 10**5

#target = kouho[:]
maxA = A[-1]
work=[0]*(A[-1]+1)

for i in range(len(A)):
    maxN = int(maxA/A[i])
    for n in range(1,maxN+1):
        buf = A[i]*n
        #remove_list.append(buf)
        work[buf]+=1
            #print(A[i]*n)
#target = kouho[:]
#kouho = list(set(kouho) - set(remove_list))

sm=0
for s in A:
    if work[s]==1: sm+=1
print(sm)

#print(len(kouho))

### FIXED CODE ###

X = list(map(int, input().split()))
# a,b=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
# c=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
# s=[list(map(int,list(input()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

#K = int(input())
#S = input()

##一次元配列の初期化
#a=[0]*5
#[i for i in range(100) if i%2==1] #奇数のみ
##二次元配列の初期化
#[[float("inf") for i in range(N)] for i in range(N)]

for i in range(len(X)):
    if X[i] == 0:
        break
    

print(i+1)
import math
A,B,C,D=map(int,input().split())
E=int(C*D/math.gcd(C,D))
a=B-A+1-(B//C-(A-1)//C+B//D-(A-1)//D-B//E+(A-1)//E)
print(a)

### FIXED CODE ###

from fractions import gcd
A,B,C,D=map(int,input().split())
E=(C*D)//gcd(C,D)
a=B-A+1-(B//C-(A-1)//C+B//D-(A-1)//D-B//E+(A-1)//E)
print(a)
while true:
H,W = map(int,raw_input().split())

 if W==0 and H==0 :
    break
 
 else :
 print ('#' * W + '\n')

 print ('#'+ '.'*(W-2)+ '#'+'\n')*(H-2)
 print ('#'*W + '\n')

### FIXED CODE ###

while 1:
    H, W = map(int,raw_input().split())
    if H + W == 0: break
    print ('#' * W)
    for h in range(H-2):
        print ('#' + '.' * (W - 2) + '#')
    print ('#' * W + '\n')
f = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(f[k])

### FIXED CODE ###

f = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(f[k-1])
while True:
        data = [int(x) for x in input().split(' ')]
        H = data[0]
        W = data[1]

        if H == 0 and W == 0:
            break

        for i in range(H):
            if i == 0 or i == H-1:
                print('#' * W)
            else:
                print('#' + '.'*(W-2) + '#')
        print('')



### FIXED CODE ###

while True:
    H,W = map(int,input().split())
    
    if H == W == 0:
        break
    
    for i in range(H):
        if i == 0 or i == H-1:
            print('#' * W)
        else:
            print('#','.'*(W-2),'#',sep='')
    print('')
import numpy
 
L, R, d = input().split()
 
N = R/d

n = 0  # 切り捨てしたい桁
y = math.floor(L * 10 ** n) / (10 ** n)

print(math.floor(y))

### FIXED CODE ###

l,r,d = map(int,input().split())
     
print( r//d -(l-1)//d )
import numpy as np
n,k,q=map(int,input().split())	
listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;
a=np.repeat(k-q,n)
for word in listA:
    a[word-1]+=1
result=[]
for i in range(len(a)):
    if a[i]<=0:
        print('No')
    else:
        print('Yes')

### FIXED CODE ###

import numpy as np
n,k,q=map(int,input().split())	
listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(int(input()))
    except:
        break;
a=np.repeat(k-q,n)
for word in listA:
    a[word-1]+=1
result=[]
for i in range(len(a)):
    if a[i]<=0:
        print('No')
    else:
        print('Yes')
import fractions

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

L = [0]
R = [0]

gl = 0
gr = 0
for i in range(N):
    gl = fractions.gcd(gl,l[i])
    L.appenzad(gl)
    gr = fractions.gcd(gr,l[N-1-i])
    R.append(gr)

M = []
for i in range(N+1):
    M.append(fractions.gcd(L[i-1],R[N-i]))

print(max(M))

### FIXED CODE ###

import fractions

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

L = [0]
R = [0]

gl = 0
gr = 0
for i in range(N):
    gl = fractions.gcd(gl,l[i])
    L.append(gl)
    gr = fractions.gcd(gr,l[N-1-i])
    R.append(gr)

M = []
for i in range(N+1):
    M.append(fractions.gcd(L[i-1],R[N-i]))

print(max(M))
import bisect

def solve():
  n = int(input())
  L = [int(i) for i in input().split()]
  L.sort()
  total = 0
  for s in range(n-2):
    for m in range(s+1, n-1):
      l = bisect.bisect_left(l,l[s]+l[m], 0, n)
      if l>m: total += l-m-1
  print(total)

  return 0

if __name__ == "__main__":
  solve()

### FIXED CODE ###

import bisect

def solve():
  n = int(input())
  L = [int(i) for i in input().split()]
  L.sort()
  total = 0
  for s in range(n-2):
    for m in range(s+1, n-1):
      #二分探索モジュールbisect
      l = bisect.bisect_left(L,L[s]+L[m], 0, n)
      if l>m: total += l-m-1
  print(total)

  return 0

if __name__ == "__main__":
  solve()
N=int(input())
H=list(map(int,input().split()))
ans=0
cnt=o
for i in range(N-1):
  if H[i]>=H[i+1]:
    cnt+=1
  else:
    ans=max(cnt,ans)
    cnt=0
ans=max(ans,cnt)
print(ans)

### FIXED CODE ###

N=int(input())
H=list(map(int,input().split()))
ans=0
cnt=0
for i in range(N-1):
  if H[i]>=H[i+1]:
    cnt+=1
  else:
    ans=max(cnt,ans)
    cnt=0
ans=max(ans,cnt)
print(ans)
from collections import Counter

s = input()
K = int(input())
c = Counter(s)

key = sorted(c.keys())
ans = []
queue = []

while (len(ans) < K):
    if queue:
        queue = sorted(list(set(queue)))
        res = queue.pop(0)
        ans.append(res)
        ans = list(set(ans))
    else:
        c = key.pop(0)
        queue.append(c)
        ind = [i for i in range(len(s)) if s[i] == c]
        for i in ind:
            for j in range(min(5, len(s) - i - 1)):
                queue.append(s[i:i+j+1])

print(ans[K-1])


### FIXED CODE ###

from heapq import heappush, heappop

s = input()
K = int(input())

min_s = sorted(list(set(s)))

res = [min(s)]
q = []
x = 0

while len(set(q)) < K:
    min_index = [n for n, v in enumerate(s) if v == min_s[x]]
    for m in min_index:
        for i in range(1, 6):
            if m+i <= len(s):
                q.append(s[m:m+i])
    x += 1

ans = sorted(list(set(q)))[K-1]

print(ans)
import math

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

N = math.gcd(A, B)
primes = []
if N % 2 == 0:
    primes.append(2)
for i in range(3, int(math.sqrt(N)) + 2, 2):
    if N % i == 0:
        for p in primes:
            if i % p == 0:
                break
        else:
            primes.append(i)
print(len(primes) + 1)


### FIXED CODE ###

import math

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

while B > 0:
    A, B = B, A % B
N = A

ans = 1
for i in [2] + list(range(3, int(math.sqrt(N)) + 2, 2)):
    if N % i == 0:
        while N % i == 0:
            N //= i
        ans += 1
if N > 1:
    ans += 1
print(ans)
N = 6 #the number of the input data
a = [[int(i) for i in input().split()] for j in range(N)]

if a[N-2] - a[0] <= k:
    print("Yay!")
else:
    print(":(")

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (e - a) <= k:
    print("Yay!")
else:
    print(":(")