Harryxun/stf_run huggingface dataset:
n,m = map(int, input().split())
A = [int(input()) for i in range(m)]
for i in range(m-1):
  if A[i]+1 == A[i+1]:
    print(0)
    exit()

ANS = [A[0]-0]
for i in range(m-1):
  ANS.append(A[i+1]-A[i]-1)
ANS.append(n-A[m-1])

Fib = [1,1,2]
for i in range(3,max(ANS)+4):
  Fib.append(Fib[i-1]+Fib[i-2])

print(Fib)
print(ANS)
ans = 1
for i in range(len(ANS)):
  ans = (ans * Fib[ANS[i]-1])%1000000007
  
print(ans)

### FIXED CODE ###

n,m = map(int, input().split())
A = [int(input()) for i in range(m)]
if m == 0:
  Fib = [1,2]
  for i in range(2,n):
    Fib.append(Fib[i-2]+Fib[i-1])
  print(Fib[n-1]%1000000007)
  exit()

B = [A[i+1]- A[i] for i in range(m-1)]
B.insert(0,A[0]+1)
B.append(n+1-A[m-1])

M = max(A)

Fib = [0,1]
for i in range(2,M+10):
  Fib.append(Fib[i-2]+Fib[i-1])

ans = 1
for i in range(len(B)):
  ans = (ans * Fib[B[i]-1])%1000000007
  
print(ans)
n = int(input())
ss = [sorted(input()) for i in range(n)]
cnt = 0
dic = {}
for s in ss:
  if s not in dic.keys():
    dic[s]=1
  else :
    dic[s]+=1
for v in dic.values():
  cnt += v*(v-1)/2
print(cnt)

### FIXED CODE ###

from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)
import math
n = int(input())
ans = float('inf')
for i in range(10^6):
  if n%i == 0:
    j = n/i
    ans = min(ans, i+j-2)
print(ans)

### FIXED CODE ###

n = int(input())
list = []
for i in range(1, int(n**0.5+1)):
  if n%i == 0:
    list.append(int(i + n/i))
print(min(list)-2)
n = int(input())

ans = 1
whille ans*2 <= n:
    ans += 2
print(ans)

### FIXED CODE ###

n = int(input())

ans = 1

while ans*2 <= n:
    ans *= 2
print(ans)
x,y = map(int,input().split())
A = (2)
B = (4,6,9,11)
C = (1,3,5,7,8,10,12)
if x in A and y in B:
  print("Yes")
else if x in B and y in B:
  print("Yes")
else if x in C and y in C:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

x,y = map(int,input().split())

B = (4,6,9,11)
C = (1,3,5,7,8,10,12)
if x==y==2:
  print("Yes")
elif x in B and y in B:
  print("Yes")
elif x in C and y in C:
  print("Yes")
else:
  print("No")
# A - Connection and Disconnection
S = input()
K = int(input())
S = S + '1'# 番兵

# 連続する文字数をカウント
cnt = []
conti = 1
for i in range(1,len(S)):
    if S[i-1] == S[i]:
        conti += 1
    else:
        cnt.append(conti)
        conti = 1

# 最初と最後の文字が同じとき
if S[0] == S[-2]:
    # 奇数個 + 奇数個のとき
    if cnt[0]%2 == 1 and cnt[-1]%2 == 1:
        comp = K - 1
        
ans = [a//2 for a in cnt if a >= 2]
ans = sum(ans)*K + comp
print(ans)        

### FIXED CODE ###

# A - Connection and Disconnection
S = input()
K = int(input())
S = S + '1'# 番兵

# 連続する文字数をカウント
cnt = []
conti = 1
for i in range(1,len(S)):
    if S[i-1] == S[i]:
        conti += 1
    else:
        cnt.append(conti)
        conti = 1
        
# 最初と最後の文字が同じときの補正値
comp = 0
if S[0] == S[-2]:
    # 奇数個 + 奇数個のとき
    if cnt[0]%2 == 1 and cnt[-1]%2 == 1:
        comp = K - 1
    # S =aaa などのとき
    if len(set(S[:-1])) == 1 and len(S[:-1])%2 == 1:
        comp = K // 2
        
ans = [a//2 for a in cnt if a >= 2]
ans = sum(ans)*K + comp
print(ans)
N = int(input())
numbers = [int(n) for n in input().split(' ')]
distances = []
counter = 0
ifFirst = True
for i in range(0, len(numbers)):
    if ifFirst:
        ifFirst = False
    if numbers[i - 1] >= numbers[i]:
        counter += 1
    else:
        distances.append(counter)
        ifFirst = True
        counter = 0

print(max(distances))

### FIXED CODE ###

N = int(input())
numbers = [int(n) for n in input().split(' ')]
distances = []
if N == 1:
    print(0)
else:
    counter = 0
    for i in range(0, len(numbers)):
        if i == len(numbers) - 1:
            distances.append(counter)
            break
        if numbers[i] >= numbers[i + 1]:
            counter += 1
        else:
            distances.append(counter)
            counter = 0

    print(max(distances))
n, m = map(int, input().split())
a = list(int(input()) for _ in range(m))

for i in range(m):
    if m == 1:
        break
    if a[i+1] - a[i] == 1:
        print(0)
        exit()

dp = [0] * (n+1)
dp[0] = 1

if 1 in a:
    dp[1] = 0
else:
    dp[1] = 1

for i in range(2, n+1):
    if i in a:
        continue
    dp[i] = dp[i-1] + dp[i - 2]
    dp[i] %= 1000000007

print(dp[n])


### FIXED CODE ###

n, m = map(int, input().split())
a = set([int(input()) for _ in range(m)])

dp = [0] * (n+1)
dp[0] = 1

if 1 in a:
    dp[1] = 0
else:
    dp[1] = 1

for i in range(2, n+1):
    if i in a:
        continue
    dp[i] = dp[i-1] + dp[i - 2]
    dp[i] %= 1000000007

print(dp[n])
import numpy as np

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

na = np.matrix(a)

mat = np.bitwise_xor(na.T,na)

print((np.sum(mat)//2)%(10**9+7))

### FIXED CODE ###

import math
import  numpy as np

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

ans = 0
a_max = max(a)

if a_max==0:alog=1
else:alog = int(math.log2(a_max))+1

for i in range(alog):
    p = pow(2, i)
    cnt = np.count_nonzero((a >> i)& 1 == 1)
    
    ans += cnt * (N - cnt)*(2**i)
print(ans%(10**9+7))
n, m = map(int, input().split())
breaks = []
for _ in range(m):
  breaks.append(int(input())-1)
stairs = [0 for _ in range(n)]

if n == 1:
  print(1)
else:
  if 0 not in breaks:
    stairs[0]=1

  if 1 not in breaks:
    stairs[1]=1  

  for i in range(n):
    if i+1 not in breaks:
      if i+1>=n:
        pass
      else:
        stairs[i+1]=stairs[i]+stairs[i+1]
    if i+2 not in breaks:
      if i+2>=n:
        pass
      else:
        stairs[i+2]=stairs[i]+stairs[i+2]
    if len(n)>3:
      if sum(stairs[-3:]) == 0:
        break

  print(stairs[-1]%1000000007)
  

### FIXED CODE ###

n, m = map(int, input().split())
stairs = [1]*(n+1)
for _ in range(m):
  stairs[int(input())] = -1

flg = False
for i in range(2,n+1):
  if stairs[i]==-1:
    pass
  elif stairs[i-1]==-1 and stairs[i-2]==-1:
    flg=True
    break
  elif stairs[i-1]==-1:
    stairs[i] = stairs[i-2]
  elif stairs[i-2]==-1:
    stairs[i] = stairs[i-1]
  else:
    stairs[i] = stairs[i-1] + stairs[i-2]
if flg:
  print(0)
else:
  print(stairs[-1]%1000000007)
n=int(input())
l=list(map(int,input().split()))
dp=[-1 for i in range(n)]
dp[0]=0
dp[1]=abs(l[0]-l[1])
def dp1(n1):
  if dp[n1]!=-1:
    return dp[n1]
  else:
    ans=min(dp1(n1-1)+abs(l[n1-1]-l[n1]),dp1(n1-2)+abs(l[n1-2]-l[n1]))
    dp[n1]=ans
    return ans
print(dp1(n-1))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)
n=int(input())
l=list(map(int,input().split()))
dp=[-1 for i in range(n)]
dp[0]=0
dp[1]=abs(l[0]-l[1])
def dp1(n1):
  if dp[n1]!=-1:
    return dp[n1]
  else:
    ans=min(dp1(n1-1)+abs(l[n1-1]-l[n1]),dp1(n1-2)+abs(l[n1-2]-l[n1]))
    dp[n1]=ans
    return ans
print(dp1(n-1))
N = int(input())
Af = list(map(int,input().split()))
A = list()
for i in range(N):
  if Af[i] % 2 == 0:
      A.append(Af[1])
      continue
  else:
      continue
for i in range(len(A)):
  if A[i] % 3 != 0 and A[i] % 5 != 0:
      print('DENIED')
      import sys
      sys.exit()
  if A[i] % 3 == 0 or A[i] % 5 == 0:
      continue 
print('APPROVED')

### FIXED CODE ###

N = int(input())
Af = list(map(int,input().split()))
A = list()
for i in range(N):
  if Af[i] % 2 == 0:
      A.append(Af[i])
      continue
  else:
      continue
for i in range(len(A)):
  if A[i] % 3 != 0 and A[i] % 5 != 0:
      print('DENIED')
      import sys
      sys.exit()
  if A[i] % 3 == 0 or A[i] % 5 == 0:
      continue 
print('APPROVED')
# -*- coding: utf-8 -*-
import math

N = map(int, input().split())
ai = input().split()

num = 0
for i in range(N):
    if ai[i] % 2 = 1:
        num += 1
    i += 1

print(i)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import math

N = int(input())
# print(N)
ai = input().split(' ')
# print(ai)
num = 0
for i in range(N):
    if i % 2 == 0:
        if int(ai[i]) % 2 == 1:
            # print('asd' + str(i))
            # print('hoge' + str(ai[i*2]))
            num += 1

print(num)
from operator import itemgetter
N,M=map(int,input().split())
A=list(map(int,input().split()))
BC=[list(map(int,input().split())) for _ in range(M)]
A=sorted(A)
sum=0
BC.sort(key=itemgetter(1),reverse=True)

for a in A:
    sum+=a

i=0
for j in range(M):
    for k in range(BC[j][0]):
        if BC[j][1]>A[i] and i<=N-1:
            sum+=BC[j][1]-A[i]
            i+=1
        else:
            break

print(sum)

### FIXED CODE ###


from operator import itemgetter
N,M=map(int,input().split())
A=list(map(int,input().split()))
BC=[list(map(int,input().split())) for _ in range(M)]
A=sorted(A)
sum=0
BC.sort(key=itemgetter(1),reverse=True)

for a in A:
    sum+=a

i=0
#print(BC)

for j in range(M):
    #print(j)
    for k in range(BC[j][0]):
        if i<=N-1 and BC[j][1]>A[i]:
            sum+=BC[j][1]-A[i]
            i+=1
        else:
            break


print(sum)
s1 = list(map(int,input().split())
s2= list(map(int,input().split())

         
if int(s1[0])+1 == int(s2[0]):
         print(1)
else:
         print(0)



### FIXED CODE ###

s1 = list(map(int,input().split()))
s2 = list(map(int,input().split()))
 
         
if int(s1[0])+1 == int(s2[0]):
         print(1)
else:
         print(0)
s=input()
n=len(s)
ans=[]
for i in range(n):
  ans.append("x")
print("",join(ans))

### FIXED CODE ###

s=input()
n=len(s)
ans=[]
for i in range(n):
  ans.append("x")
print("".join(ans))
import numpy as np
A = np.array(input())
for i, val in numpy.ndenumerate(A):
    if val==0:
        break
    else:
        print('Case '+repr(i[0])+': '+repr(val))

### FIXED CODE ###

import sys
cnt = 1
for x in sys.stdin:
    i= int(x)
    if i == 0: break
    print('Case '+repr(cnt)+': '+repr(i))
    cnt+=1
N = int(input())
L = list(map(int, input().split()))
L.sort(reverse = True)

def binary(mini,maxi,a,b): #a>b
  if maxi == mini + 1:
    if L[maxi] > a - b:
      return maxi
    elif L[mini] > a - b:
      return mini
    else:
      return False
  elif maxi == mini:
    if L[maxi] > a - b:
      return maxi
    else:
      return False
  else:
    mid = (mini+maxi)//2
    if L[mid] > a - b:
      return binary(mid,maxi,a,b)
    else:
      return binary(mini,mid,a,b)
      
for a in range(0, N-2):
  for b in range(a+1, N-1):
    tmp = binary(b+1, N-1, L[a], L[b])
    if tmp:
      ans += tmp - b
print(ans)

### FIXED CODE ###

N = int(input())
L = list(map(int, input().split()))
L.sort(reverse = True)

def binary(mini,maxi,a,b): #a>b
  if maxi == mini + 1:
    if L[maxi] > a - b:
      return maxi
    elif L[mini] > a - b:
      return mini
    else:
      return False
  elif maxi == mini:
    if L[maxi] > a - b:
      return maxi
    else:
      return False
  else:
    mid = (mini+maxi)//2
    if L[mid] > a - b:
      return binary(mid,maxi,a,b)
    else:
      return binary(mini,mid,a,b)
ans = 0
for a in range(0, N-2):
  for b in range(a+1, N-1):
    tmp = binary(b+1, N-1, L[a], L[b])
    if tmp:
      ans += tmp - b
print(ans)
A = int(input())
B = int(input())
C = int(input())
X = int(input())
res = 0
if 50=>A=>0 and 50=>B=>0 and 50=>C=>0 and (A+B+C)=>1 and 50=<X=<20000 and X%50==0:
  for i in range(A+1):
    for j in range(B+1):
      for k in range(C+1):
        if 500*i + 100*j + 50*k == X:
          res += 1
print(res)


### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i + 100*j + 50*k == x:
        ans += 1

print(ans)
s=input().replace('eraser',"")replace('eraser',"").replace('erase',"")replace('dreamer',"")replace('dream',"")
if s:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

s=input().replace('eraser',"").replace('eraser',"").replace('erase',"").replace('dreamer',"").replace('dream',"")
if s:
    print("NO")
else:
    print("YES")
S = input()
K = int(input())

if len(S) >= K:
    for l in S:
        if l != '1':
            output = l
            break
else :
    for i in range(K):
        if S[i] != '1':
            output = S[i]
            break
            
print(output)


### FIXED CODE ###

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

output = ''

if len(S) <= K:
    for letter in S:
        if letter != '1':
            output = letter
            break
else :
    for i in range(K):
        if S[i] != '1':
            output = S[i]
            break

if output:
    print(output)
else :
    print('1')
def work(a,b,c,A,B,C):
    if A==0:
        return work(b,c,'',B,C,0)
    if B==0:
        if C==0:
            return a*A
        else:
            return work(a,c,'',A,C,0)
    if C==0:
        return work(a+b*(B/A),a+b*(B/A+1),'',A-B%A,B%A,0)
    cmod = C%A
	if B <= A-cmod:
		return work(a+c*(C/A),a+c*(C/A)+b,a+c*(C/A+1),A-cmod-B,B,cmod)
	else:
		B = B - (A-cmod)
		bmod = B%A
		if bmod>=cmod:
			return work(a+c*(C/A)+b*(B/A+1),a+c*(C/A)+b*(B/A+2),a+c*(C/A+1)+b*(B/A+1),A-bmod,bmod-cmod,cmod)
		else:
			return work(a+c*(C/A)+b*(B/A+1),a+c*(C/A+1)+b*(B/A),a+c*(C/A+1)+b*(B/A+1),A-cmod,cmod-bmod,bmod)

if __name__ == '__main__':
    s = raw_input()
    a,b,c = [int(i) for i in s.split()]
    print(work('a','b','c',a,b,c))


### FIXED CODE ###

def work(a,b,c,A,B,C):
 if A==0:
  return work(b,c,'',B,C,0)
 if B==0:
  if C==0:
   return a*A
  else:
   return work(a,c,'',A,C,0)
 if C==0:
  return work(a+b*(B/A),a+b*(B/A+1),'',A-B%A,B%A,0)
 cmod = C%A
 if B <= A-cmod:
  return work(a+c*(C/A),a+c*(C/A)+b,a+c*(C/A+1),A-cmod-B,B,cmod)
 else:
  bmod = B%(A-cmod)
  return work(a+c*(C/A)+b*(B/(A-cmod)),a+c*(C/A)+b*(B/(A-cmod)+1),a+c*(C/A+1),A-bmod-cmod,bmod,cmod)

if __name__ == '__main__':
 s = raw_input()
 a,b,c = [int(i) for i in s.split()]
 print(work('a','b','c',a,b,c))
import math

N, M = map(int,input().split())
S=input()
T=input()

Slist=list(S)
Tlist=list(T)

L=int(N*M/math.gcd(N,M))
G=math.gcd(N,M)

A=int(N/G)
B=int(M/G)

for i in range(G):
    if Slist[i*A]!=Tlist[i*B]:
        ans=-1
        break
    else:
        ans=L
print(ans)

### FIXED CODE ###

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

N, M = map(int,input().split())
S=input()
T=input()

Slist=list(S)
Tlist=list(T)

L=int(N*M/gcd(N,M))
G=gcd(N,M)

A=int(N/G)
B=int(M/G)

for i in range(G):
    if Slist[i*A]!=Tlist[i*B]:
        ans=-1
        break
    else:
        ans=L
print(ans)
x,a=map{int,input().split()}
if a>x:
   print("0")
else:
   print("10")

### FIXED CODE ###

x,a=map(int,input().split())
if x>=a :
   print("10")
else:
   print("0")
s = input()
if s[0]==s[1] or s[1]==s[2] or s[2]==-s[3]:
    print("Good")
else:
    print("Bad")

### FIXED CODE ###

s = input()
for i in range(1,4):
    if s[i]==s[i-1]:
        print("Bad")
        exit()
print("Good")
import math
while True:
    n = int(input())
    score = [ int(i) for i in input().split(" ") ] 
    average = sum(score) / float(n)
    if n == 0:
        break
    print("{:.8f}".format(math.sqrt(sum([(x-average) ** 2]) / n ) 

### FIXED CODE ###

import math
while True:
    n = int(input())
    if n == 0:
        break
    s = [int(i) for i in input().split(" ")]
    m = sum(s) / n
    print("{:.8f}".format(math.sqrt(sum([(x-m) ** 2 for x in s]) / n)))
import statistics as stats
from math import factorial


class Comb:
    def __init__(self):
        super(Comb, self).__init__()
        self.dic = {}

    def nCr(self, n, r):
        if n == r or r == 0:
            return 1
        if self.dic.get((n, r), None) is None:
            self.dic[(n, r)] = self.nCr(n-1, r-1) + self.nCr(n-1, r)
        return self.dic[(n,r)]


def main():
    N, A, B = tuple(map(int, input().split(' ')))
    max_ave = 0
    v_list = sorted(list(map(int, input().split(' '))), reverse=True)

    bucket_min = v_list[A-1]
    max_ = v_list[0]

    max_bucket = v_list[:A]

    max_ave = stats.mean(max_bucket)

    all_bmin_cnt = v_list.count(bucket_min)
    b_bmin_cnt = max_bucket.count(bucket_min)
    all_max_cnt = v_list.count(max_)

    comb = Comb()

    print(max_ave)

    if all_max_cnt <= A:
        print(comb.nCr(all_bmin_cnt, b_bmin_cnt))
    else:
        num = 0
        for r in range(A, B+1):
            num += comb.nCr(all_max_cnt, r)
        print(num)



if __name__ == '__main__':
    main()


### FIXED CODE ###

import math


def C(n,r):
    fact = math.factorial
    return fact(n) // fact(r) // fact(n-r)

def main():
    N, A, B = tuple(map(int, input().split(' ')))
    v = list(map(int, input().split(' ')))

    v.sort(reverse=True)

    print(sum(v[:A])/A)

    a, b = v.count(v[A-1]), v[:A].count(v[A-1])

    if v[0] == v[A-1]:
        print(sum([C(a, r) for r in range(A, min(B, a)+1)]))
    else:
        print(C(a, b))



if __name__ == '__main__':
    main()
import sys
import numpy as np


def solve(N):
    p, q = 0, 1
    for x in N:
        p, q = min(p + x, q + 10 - x), min(p + x + 1, q + 9 - x)
    print(p)


try:
    sys.winver
    N = np.array([int(_) for _ in input()])
    from numba import jit
    solve = jit(solve, '(i8[:])')
    solve(N)
except:
    if sys.argv[-1] == 'ONLINE_JUDGE':
        import numba
        from numba.pycc import CC
        cc = CC('my_module')
        cc.export('solve', '(i8[:])')(solve)
        # b1: bool, i4: int32, i8: int64, double: f8, [:], [:, :]
        cc.compile()
    else:
        from my_module import solve
        N = np.array([int(_) for _ in input()])
        solve(N)


### FIXED CODE ###

N = [int(_) for _ in input()]
dp = [[0, 0] for _ in range(len(N))]
dp[0][0] = min(N[0], 11 - N[0])
dp[0][1] = min(N[0] + 1, 10 - N[0])
for i in range(1, len(N)):
    dp[i][0] = min(dp[i - 1][0] + N[i], dp[i - 1][1] + 10 - N[i])
    dp[i][1] = min(dp[i - 1][0] + N[i] + 1, dp[i - 1][1] + 9 - N[i])
print(dp[-1][0])
n, u, v = map(int, input().split())
edge = [tuple(map(int, input().split())) for _ in range(n-1)]
u -= 1
v -= 1

connect = [set() for _ in range(n)]
for a, b in edge:
    connect[a-1].add(b-1)
    connect[b-1].add(a-1)

du = [0] * n
dv = [0] * n

def dfs(v, dis, ng, d):
    d[v] = dis
    ng.add(v)
    for w in connect[v]:
        if w not in ng:
            dfs(w, dis+1, ng, d)

dfs(u, 0, set(), du)
dfs(v, 0, set(), dv)

print(du)
print(dv)
ans = 0
for i in range(n):
    if du[i] < du[i]:
        ans = max(ans, du[v]-1)
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(2*10**5)

n, u, v = map(int, input().split())
edge = [tuple(map(int, input().split())) for _ in range(n-1)]
u -= 1
v -= 1

connect = [set() for _ in range(n)]
for a, b in edge:
    connect[a-1].add(b-1)
    connect[b-1].add(a-1)

du = [0] * n
dv = [0] * n

def dfs(v, dis, ng, d):
    d[v] = dis
    ng.add(v)
    for w in connect[v]:
        if w not in ng:
            dfs(w, dis+1, ng, d)

dfs(u, 0, set(), du)
dfs(v, 0, set(), dv)

ans = 0
for i in range(n):
    if du[i] < dv[i]:
        ans = max(ans, dv[i]-1)
print(ans)
n,k=list(map(int,input().split()))
A=[i for i in range(1,n+1)]
B=list(map(int,input().split())) 
road=dict(zip(A,B))

#残りi回移動する、移動前に自分がいるところをj
def walk(i,j):
    if i==1:
        return road[j]
    else:
        return walk(i-1,road[j])

print(walk(k,1))

### FIXED CODE ###

n,k=list(map(int,input().split()))
A=[i for i in range(1,n+1)]
B=list(map(int,input().split())) 
road=dict(zip(A,B))

#残りi回移動する、移動前に自分がいるところをj
#def walk(i,j):
#        return road[j]
#    else:
#        return walk(i-1,road[j])

j=1
C=[-1 for i in range(n)]
dp=dict(zip(A,C))
dp[1]=0
num=0
while dp[j]!=k-1:
    j=road[j]
    num=num+1
    if dp[j]== -1:
        dp[j]=num
    else:
        t=num-dp[j]
        pre=dp[j]
        itti=j
        break
    if num==k-1:
        print(road[j])
        exit()

mod=(k-pre)%t

for i in range(mod):
    itti=road[itti]
print(itti)
n = int(input())
a = list(map(int,input().split()))
if len(a)%3 == 0
  print("YES")
else:
  print("NO")

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
if sum(a)%2==0:
  print("YES")
else:
  print("NO")
a = input()
b???= input()
print(int(a) * int(b)),((int(a) * 2) + (int(b) * 2))

### FIXED CODE ###

a ,b = input().split(' ')
print(int(a) * int(b),(int(a) * 2) + (int(b) * 2))
impot numpy as np
N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
number = np.zeros(N, dtype = int)
for i in range(N):
  number[A[i]-1] += 1
total = 0
for k in range(N):
  total += number[k] * (number[k]-1) // 2
for j in range(N):
  print(total - number[A[j]-1] + 1)


### FIXED CODE ###

import numpy as np
from sys import stdin
input = stdin.readline
N = int(input())
A = list(map(int, input().split()))
number = np.zeros(N, dtype = int)
total = 0

dic = {}
a = sorted(A)
now_key = a[0]
value = 1
dic[now_key] = 1
for i in range(1,N):
  if a[i] == now_key:
    value += 1
  else:
    dic[now_key] = value
    if value >= 2:
      total += value * (value-1) // 2
    now_key = a[i]
    value = 1
dic[now_key] = value
if value >= 2:
  total += value * (value-1)//2
for j in A:
  print(total - dic[j] + 1)
N, X = map(int, input().split())
*L, = map(int, input().split())

D = [0]
for i in range(1, N+1):
    D.append(D[i-1] + L[i-1])

num = 0
i = 0
d = D[i]
while d <= X:
    num += 1
    i += 1
    d = D[i]
print(num)

### FIXED CODE ###

N, X = map(int, input().split())
*L, = map(int, input().split())

D = [0]
for i in range(1, N+1):
    D.append(D[i-1] + L[i-1])

num = 0
i = 0
d = D[i]
while d <= X and num < N+1:
    num += 1
    i += 1
    if i != N+1:
        d = D[i]

print(num)
A, B = map(int, input.split())
if A <= 5:
  print(0)
elif A <= 12:
  print(B // 2)
else:
  print(B)

### FIXED CODE ###

A, B = map(int, input().split())
if A <= 5:
  print(0)
elif A <= 12:
  print(B // 2)
else:
  print(B)
a, b, n = map(int, input().split())

x = min(b. n)
print(int(a * x / b))


### FIXED CODE ###

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

x = min(b - 1, n)
ans = int(a * x / b)

#if a == 1 or b == 1 or b == n:
#    print(0)
#else:
print(ans)
n =int(input())
for i in range(16):
    if (n%(i*7))%4==0:
        print("Yes")
        exit()
print("No")


### FIXED CODE ###

n =int(input())
for i in range(16):
    for j in range(26):
        if i*7+j*4==n:
            print("Yes")
            exit()
print("No")
W, H, x, y, r = map(int, input().split())
if x + r <= W and x - r >= 0 and y + r <= H and y - r >= 0:
     printf('Yes')
else:
     printf('No')

### FIXED CODE ###

W, H, x, y, r = map(int, input().split())
if x + r <= W and x - r >= 0 and y + r <= H and y - r >= 0:
     print('Yes')
else:
     print('No')
s= input()
n = len(s)
for i in range(n-2):
    k = 100*int(s[i])+10*int(s[i+1])+int(s[i+2])
    if min > abs(753-k):
        min = abs(753-k)
    
print(min)

### FIXED CODE ###

s= input()
n = len(s)
min = 1000
for i in range(n-2):
    k = 100*int(s[i])+10*int(s[i+1])+int(s[i+2])
    if min > abs(753-k):
        min = abs(753-k)
    
print(min)
,K = map(int,input().split())
h = list(map(int,input().split()))

dp = [0]*N
for i in range(1,N):
    dp[i] = dp[i-1]+abs(h[i]-h[i-1])
    for j in range(max(0,i-K),i):
        dp[i] = min(dp[j]+abs(h[i]-h[j]),dp[i])
print(dp[N-1])



### FIXED CODE ###


N,K = map(int,input().split())
h = list(map(int,input().split()))

dp = [0]*N
for i in range(1,N):
    dp[i] = dp[i-1]+abs(h[i]-h[i-1])
    for j in range(max(0,i-K),i):
        dp[i] = min(dp[j]+abs(h[i]-h[j]),dp[i])
print(dp[N-1])
n,m,x,y=map(int,input().split())
X=list(map(int,input().split()))
Y=list(map(int,input().split()))
max_X=max(X)
min_Y=min(Y)
print('No War' if max_x<min_Y else 'War')

### FIXED CODE ###

n,m,x,y=map(int,input().split())
X=list(map(int,input().split()))
Y=list(map(int,input().split()))
max_X=max(X)
min_Y=min(Y)
print('No War' if max_X<min_Y and max_X<y and x<min_Y else 'War')
n,m=map(int,input().split())
li=[]
for ai in range(m):
    ai=int(input())
    li.append(ai)
k=sum(li)
if k<=n:
    print(m-k)
else:
    print("-1")

### FIXED CODE ###

n,m=map(int,input().split())
ai=list(map(int,input().split()))
k=sum(ai)
if k<=n:
    print(n-k)
else:
    print("-1")
N, X, T = map(int, input())
import math
number_of_times = math.ceil(N/X)
total_time = T * number_of_times
print(number_of_times)


### FIXED CODE ###

N, X, T = map(int, input().split())
import math
number_of_times = math.ceil(N/X)
total_time = T * number_of_times
print(total_time)
print(N*(N+1)/2)

### FIXED CODE ###

n=int(input())
     
sum=n*(n+1)/2
     
print(int(sum))