Harryxun/stf_run huggingface dataset:
SNK = [1,2,3,4,5,6,7,8,9] #1桁目

for i in range(1,10): SNK.append((i*10)+9) #2桁目
for i in range(1,10): SNK.append((i*100)+99) #3桁目

for j in range(9): #4-12桁目
    SNK_sub = [19,29,39,49,59,69,79,89,99]
    SNK_sub = list(map(lambda x:(x*pow(10,2+j))+(pow(10,2+j)-1),SNK_sub))
    for i in range(10,20+(10*j)):
        SNK.append(i*pow(10,2+j)+(pow(10,2+j)-1))
    SNK += SNK_sub[j+1:]
    
for j in range(3): #13,14桁目
    for i in range(10,100):
        SNK.append(i*pow(10,10+j)+(pow(10,10+j)-1))

K = int(input())

for i in range(K):
    print(SNK[i])

### FIXED CODE ###

LEN = 0

SNK = [1,2,3,4,5,6,7,8,9]
#SNK.append("SUNUKE!:"+str(1))
LEN +=1

for i in range(1,10): SNK.append(i*10+9)
#SNK.append("SUNUKE!:"+str(2))
LEN +=1

#for i in range(1,10): SNK.append(i*100+99)
#SNK.append("SUNUKE!:"+str(3))
LEN +=1

for loop in range(2):
    SNK_sub = list(range(pow(10,loop),pow(10,loop+1)))
    SNK += list(map(lambda x:(x*pow(10,LEN-1))+(pow(10,LEN-1)-1),SNK_sub))
    LEN += len(str(max(SNK_sub)))-1
    for d in SNK_sub: #loop=0のとき，d=1-9
        SNK += [(i*pow(10,LEN-1))+(pow(10,LEN-1)-1) for i in range(10,10*(d+1))]
        SNK += list(map(lambda x:(x*pow(10,LEN))+(pow(10,LEN)-1),SNK_sub[SNK_sub.index(d)+1:]))
        #SNK.append("SUNUKE!:"+str(LEN+3))
        LEN += 1+loop
        if LEN>20:break

print("\n".join(str(i) for i in SNK[:int(input())]))
N,K=map(int,input().split())
c=0
if K%2==0:
    d=K//2
else:
    print(N//K**3)

for i in range(d,N+1,d):
    for j in range(d,N+1,d):
        for k in range(d,N+1,d):
            if (i+j)%K==0 and (j+k)%K==0 and (k+i)%K==0:
                c+=1
print(c)

### FIXED CODE ###

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

if K%2==0:
    print((N//K)**3+((N//(K//2))-(N//K))**3)
else:
    print((N//K)**3)
a = int(input())
c['AC'] = c['WA'] = c['TLE'] = c['RE'] = 0
for _ in range(a):
  c[input()]+=1
print('AC x ', en = '')
print(c['AC'])

print('WA x ', en = '')
print(c['WA'])

print('TLE x ', en = '')
print(c['TLE'])

print('RE x ', en = '')
print(c['RE'])

### FIXED CODE ###

a = int(input())
c = {}
c['AC'] = c['WA'] = c['TLE'] = c['RE'] = (int)(0)
for _ in range(a):
  c[input()]+=1
print('AC x ', end = '')
print(c['AC'])

print('WA x ', end = '')
print(c['WA'])

print('TLE x ', end = '')
print(c['TLE'])

print('RE x ', end = '')
print(c['RE'])
N, K = map(int, input().split())
H = list(map(int, input().split()))
c = 0
for h in H:
  if h>=K:
    c += 1
primt(c)

### FIXED CODE ###

N, K = map(int, input().split())
H = list(map(int, input().split()))
c = 0
for h in H:
  if h>=K:
    c += 1
print(c)
a,b,k=map(int,input().split())
if a>=k:
  print(a-k.b)
elif a+b>=k:
  print(0,a+b-k)
else:
  print(0,0)

### FIXED CODE ###

a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
elif a+b>=k:
  print(0,a+b-k)
else:
  print(0,0)
import sys
# sys.setrecursionlimit(100000)
N, Q = map(int, input().split())
paths = [list() for _ in range(N+1)]
for _ in range(N-1):
    a, b = map(int, input().split())
    paths[a].append(b)
    paths[b].append(a)
# ab = [list(map(int, input().split())) for _ in range(N-1)]
px = [list(map(int, input().split())) for _ in range(Q)]

nodes = [0]*(N+1)
# childs = [list() for _ in range(N+1)]

# def dfs(root, node, arr, check):
#     check[node] = 1
#     arr[root].append(node)
#     for loof in paths[node]:
#         if check[loof] == 0:
#             dfs(root, loof, arr, check)

# for i in range(1, N+1):
#     visit = [0]*(N+1)
#     dfs(i, i, childs, visit)


# for op in px:
#     for child in childs[op[0]]:
#         nodes[child] += op[1]

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

counters = [0]*(N+1)
for x in px:
    counters[x[0]] += x[1]

visit = [0]*(N+1)
def dfs(node, score, nodes):
    visit[node] = 1
    score += counters[node]
    nodes[node] = score
    for loof in paths[node]:
        if visit[loof] == 0:
            dfs(loof, score, nodes)

dfs(1, 0, nodes)
    

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

### FIXED CODE ###

import sys
sys.setrecursionlimit(400000)
N, Q = map(int, input().split())
paths = [list() for _ in range(N+1)] # paths[i] : 頂点iと繋がってる点を全て表す
for _ in range(N-1):
    a, b = map(int, input().split())
    paths[a].append(b)
    paths[b].append(a)
# ab = [list(map(int, input().split())) for _ in range(N-1)]
px = [list(map(int, input().split())) for _ in range(Q)]

ans = [0]*(N+1) # ans[i] : 頂点iについて答える値を格納

counters = [0]*(N+1) # そのノードの部分木に与える点数の総和を格納
for x in px:
    counters[x[0]] += x[1]

visit = [0]*(N+1) #dfsをする時に一度訪れた点に再訪しないための確認
def dfs(node, score, ans):
    visit[node] = 1 # 訪問したことを記録
    score += counters[node] # 自分の部分木に加点する分を加えて後世に残す
    ans[node] = score # 点数の記録
    for loof in paths[node]: # 自分と繋がってる各ノードについて
        if visit[loof] == 0: # まだ探索していなければ
            dfs(loof, score, ans) # 探索

dfs(1, 0, ans)
    

for i in range(1, N+1):
    print(ans[i])
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a = [0]*(N+1)
b = [0]*(M+1)
X = 0
Y = 0
cnt = 0
for n in range(N):
    a[n+1] = a[n] + A[n]
for n in range(M):
    b[n+1] = b[n] + B[n]
for n in range(1, N+1):
    if a[n] <= K:
        X += 1
    else:
        break
for m in range(1, M+1):
    if b[m] <= K:
        Y += 1 
    else:
        break
if a[X] < b[Y]:
    K = K - a[X]
    cnt += X
    if K - b[Y] == 0:
        cnt += Y
    else:
        for y in range(1, Y):
            if b[y] < K:
                cnt += 1
            else:
                break
else:
    K = K - b[Y]
    cnt += Y
    if K - b[X] == 0:
        cnt += X
    else:
        for x in range(1, X):
            if b[x] < K:
                cnt += 1
            else:
                break
print(cnt)

### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a = [0]*(N+1)
b = [0]*(M+1)
for n in range(N):
    a[n+1] = a[n] + A[n]
for n in range(M):
    b[n+1] = b[n] + B[n]
ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)
def dfs(i, n, a, L):
    # x + y = n - 1
    # x - y = a
    # x = (n - 1 + a) / 2
    # y = (n - 1 - a) / 2
    if i == n:
        return 1
    if a [i] == 0:
        x = [(n - 1 + a[i]) // 2]
    else:
        x = [(n - 1 + a[i]) // 2, (n - 1 - a[i]) // 2]
    t = 0
    MOD = 10 ** 9 + 7
    for xi in x:
        if L[xi] == 0:
            L[xi] = i + 1
            t += dfs(i + 1, n, a, L)
            L[xi] = 0
    return t % MOD

n = int(input())
a = list(map(int, input().split()))
L = [0 for _ in range(n)]
ans = dfs(0, n, a, L)
print(ans)


### FIXED CODE ###

from collections import defaultdict

MOD = 10 ** 9 + 7
n = int(input())
a = list(map(int, input().split()))
d = defaultdict(int)
for ai in a:
    d[ai] += 1
ans = 1
if n % 2:
    for k, v in d.items():
        if k > 0 and v == 2:
            ans *= 2
        elif k == 0 and v == 1:
            ans *= 1
        else:
            ans = 0
            break
        ans = ans % MOD
else:
    for v in d.values():
        if v == 2:
            ans *= 2
        else:
            ans = 0
            break
        ans = ans % MOD
print(ans)
n = int(input())
set1 = set([])
for _ in range():
  s = input()
  set1.add(s)
 
print(len(set1))

### FIXED CODE ###

n = int(input())
set1 = set([])
for _ in range(n):
  s = input()
  set1.add(s)
 
print(len(set1))
def main():
	S, T = input(), input()

	Z = 20 # 3010
	dp = [[0] * Z for _ in range(Z)]
	for i in range(len(S)):
		for j in range(len(T)):
			if S[i] == T[j]:
				dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j] + 1)
			dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i + 1][j])
			dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j + 1])

	#for line in dp:
	#	print(line)
	#print(dp[len(S)][len(T)])
	i, j, result = len(S), len(T), ""
	while 0 < i and 0 < j:
		if dp[i][j] == dp[i - 1][j]:
			i -= 1
		elif dp[i][j] == dp[i][j - 1]:
			j -= 1
		else:
			result = S[i - 1] + result
			i -= 1
			j -= 1
	print(result)

main()


### FIXED CODE ###

def main():
	S, T = input(), input()

	Z = 3010
	dp = [[0] * Z for _ in range(Z)]
	for i in range(len(S)):
		for j in range(len(T)):
			if S[i] == T[j]:
				dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j] + 1)
			dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i + 1][j])
			dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j + 1])

	#for line in dp:
	#	print(line)
	#print(dp[len(S)][len(T)])
	i, j, result = len(S), len(T), ""
	while 0 < i and 0 < j:
		if dp[i][j] == dp[i - 1][j]:
			i -= 1
		elif dp[i][j] == dp[i][j - 1]:
			j -= 1
		else:
			result = S[i - 1] + result
			i -= 1
			j -= 1
	print(result)

main()
o = list(input())
e = list(input()+[""])

for x, y in zip(o, e):
  print(x+y, end="")

### FIXED CODE ###

o = list(input())
e = list(input())+[""]

for x, y in zip(o,e):
  print(x+y,end="")
a,b,k = map(int,input().split())
l = list(range(a,b+1))
newl = sorted(list(set(l[:k] + l[-k:])))

for i in newl:
  print(i)

### FIXED CODE ###

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

if (b-a)//2 + 1 <= k:
  for i in range(a,b+1):
    print(i)
else:
  for i in range(a,a+k):
    print(i)
  for j in range(b-k+1,b+1):
    print(j)
s = str(input())

s[0] = s[-1]

### FIXED CODE ###

s = str(input())
count = 0

for i in range(len(s)//2):
    if s[i] != s[len(s)-i-1]:
        count += 1

print(count)
n=int(input())
x=time.time()
for i in range(1,3501):
  for j in range(2,3501):
    p=4*i*j-n*(i+j)
    if p>0:
      q=n*i*j
      if q%p==0:
        print(i,j,q//p)
        exit()

### FIXED CODE ###

n=int(input())
for i in range(1,3501):
  for j in range(1,3501):
    if (4*i*j-n*i-n*j)!=0:
      if (n*i*j)%(4*i*j-n*i-n*j)==0 and (n*i*j)//(4*i*j-n*i-n*j)>0:
        k=(n*i*j)//(4*i*j-n*i-n*j)
        break
  else:
    continue
  break
print(i,j,k)
N = 104723
p = [1]*(N + 1)
for i in range(4, N + 1, 2): p[i] = 0
a = [2]
for i in range(3, N + 1, 2):
    if p[i] == 1:
        a.append(a[-1] + i)
        for j in range(3*i, N + 1, 2*i): p[j] = 0

while True:
    n = int(input())
    if n == 0: break
    print(a[n - 1])

### FIXED CODE ###

N = 104743
p = [1]*(N + 1)
for i in range(4, N + 1, 2): p[i] = 0
a = [2]
for i in range(3, N + 1, 2):
    if p[i] == 1:
        a.append(a[-1] + i)
        for j in range(3*i, N + 1, 2*i): p[j] = 0

while True:
    n = int(input())
    if n == 0: break
    print(a[n - 1])
import math
import numpy

a, b = map(int, input(),split())
c = str(a) + str(b)
d = int(c)
if math.sqrt(d)**0.5 % 1 ==0 :
  print("Yes")
else:
  print("No")


### FIXED CODE ###

a, b = map(int, input().split())
print("Odd" if a * b % 2 else "Even")
A,B = map(int, input(.split()))

if A*B%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")
s=input()
a_min=0
z_max=0
for i in s:
  if s[i]=="A":
    a_min=i
    break
for i in s:
  if s[i]=="Z":
    z_max=i
print(z_max-a_min+1)

### FIXED CODE ###

s=input()
a_min=0
z_max=0
for i in range(len(s)):
  if s[i]=="A":
    a_min=i
    break
for i in range(len(s)):
  if s[i]=="Z":
    z_max=i
print(z_max-a_min+1)
def f(x,y,z):
    n=x**2 + y**2 + z**2 + x*y + y*z + z*x
    return n

N=int(input())

if N>=5000:
  print(aaa)

anslist=[0]*60100

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            n= f(x,y,z)
            anslist[n-1]+=1

for i in range(N):
    print(anslist[i])

### FIXED CODE ###

def f(a,b,c):
    n=(a+b+c)**2 -a*b -b*c -c*a
    return n

N=int(input())

anslist=[0]*1000005

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            n= f(x,y,z)
            anslist[n-1]+=1

for i in range(N):
    print(anslist[i])
def primesbelow(N):
    # http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188
    #""" Input N>=6, Returns a list of primes, 2 <= p < N """
    correction = N % 6 > 1
    N = {0:N, 1:N-1, 2:N+4, 3:N+3, 4:N+2, 5:N+1}[N%6]
    sieve = [True] * (N // 3)
    sieve[0] = False
    for i in range(int(N ** .5) // 3 + 1):
        if sieve[i]:
            k = (3 * i + 1) | 1
            sieve[k*k // 3::2*k] = [False] * ((N//6 - (k*k)//6 - 1)//k + 1)
            sieve[(k*k + 4*k - 2*k*(i%2)) // 3::2*k] = [False] * ((N // 6 - (k*k + 4*k - 2*k*(i%2))//6 - 1) // k + 1)
    return [2, 3] + [(3 * i + 1) | 1 for i in range(1, N//3 - correction) if sieve[i]]

n=int(input())
primes=primesbelow(n)
factor={}

def val(n,d):
    ans=0
    t=d
    while(t<=n):
        ans+=(n//t)
        t*=d
    return ans
g2=0
g4=0
g24=0
g14=0
g74=0
for i in primes:
    k=val(n,i)
    if k>=4:
        g4+=1
    if k>=2:
        g2+=1
    if k>=24:
        g24+=1
    if k>=14:
        g14+=1
    if k>=74:
        g74+=1

a=(g2-2)*((g4*(g4-1))//2)
b=g24*(g2-1)
c=g14*(g4-1)
d=g74
print(a+b+c+d)

### FIXED CODE ###


def primesbelow(N):
    # http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188
    #""" Input N>=6, Returns a list of primes, 2 <= p < N """
    correction = N % 6 > 1
    N = {0:N, 1:N-1, 2:N+4, 3:N+3, 4:N+2, 5:N+1}[N%6]
    sieve = [True] * (N // 3)
    sieve[0] = False
    for i in range(int(N ** .5) // 3 + 1):
        if sieve[i]:
            k = (3 * i + 1) | 1
            sieve[k*k // 3::2*k] = [False] * ((N//6 - (k*k)//6 - 1)//k + 1)
            sieve[(k*k + 4*k - 2*k*(i%2)) // 3::2*k] = [False] * ((N // 6 - (k*k + 4*k - 2*k*(i%2))//6 - 1) // k + 1)
    return [2, 3] + [(3 * i + 1) | 1 for i in range(1, N//3 - correction) if sieve[i]]

n=int(input())
primes=primesbelow(n+10)
factor={}

def val(n,d):
    ans=0
    t=d
    while(t<=n):
        ans+=(n//t)
        t*=d
    return ans
g2=0
g4=0
g24=0
g14=0
g74=0
for i in primes:
    k=val(n,i)
    if k>=4:
        g4+=1
    if k>=2:
        g2+=1
    if k>=24:
        g24+=1
    if k>=14:
        g14+=1
    if k>=74:
        g74+=1

a=(g2-2)*((g4*(g4-1))//2)
b=g24*(g2-1)
c=g14*(g4-1)
d=g74
print(a+b+c+d)
N, A, B = map(int,input().split(" "))

L = []

for i in range(10*100):
    L += A*["b",]
    L += B*["r",]
    if len(L) >= N:
        break

#print(L,L[:N])
cnt = 0
for l in L[:N]:
    if l == "b":
        cnt += 1

print(cnt)

### FIXED CODE ###

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

ans = (N//(A+B))*A + min((N%(A+B)),A)

print(ans)
from collections import deque

def bfs(maze, visited, sy, sx, dead, goal):
    queue = deque([[sy, sx]])
    visited[sy][sx] = 0
    count = 0
    while queue:
        y, x = queue.popleft()
        if maze[y][x] == goal:
            count += 1
        for j, k in ([1, 0], [-1, 0], [0, 1], [0, -1]):
            new_y, new_x = y+j, x+k
            if not maze[new_y][new_x] in dead and \
                visited[new_y][new_x] == -1:
                visited[new_y][new_x] = visited[y][x] + 1
                queue.append([new_y, new_x])
    return count % 1000000007

n,m=map(int, input().split())
a=[int(input()) for i in range(m)]
maze=[[2*i+j for i in range(int(n/2+1))] for j in range(n+1)]
visited = [[[-1] for i in range(int(n/2+1))] for j in range(n+1)]
print(bfs(maze, visited, 0, 0, a, n))


### FIXED CODE ###

N, M=map(int, input().split())
items=[int(input()) for i in range(M)]
mod=10**9+7
dp=[0 for i in range(N+1)]
dp[0] = 1
is_broken =[1 for i in range(N+1)]

for i in range(M):
    is_broken[items[i]] = 0

for i in range(N):
    if i-1 >= 0:
        dp[i+1] = dp[i]*is_broken[i] + dp[i-1]*is_broken[i-1]
    else:
        dp[i+1] = dp[i]*is_broken[i]
    dp[i+1] %= mod

print(dp[N])
h, w = map(int, input().split())
s = [input() + '#' for _ in range(h)]
s.append('#' * w)

yoko = [[0] * w for _ in range(h)]
for i in range(h):
  si = s[i]
  for j in range(w):
    if si[j] == '.':
      start = j
      break
  for j in range(start, w + 1):
    if si[j] == '#':
      if start != -1:
        for k in range(start, j):
          yoko[i][k] = j - start
        start = -1
    else:
      if start == -1:
        start = j

tate = [[0] * w for _ in range(h)]
for i in range(w):
  for j in range(h):
    if s[j][i] == '.':
      start = j
      break
  for j in range(start, h + 1):
    if s[j][i] == '#':
      if start != -1:
        for k in range(start, j):
          tate[k][i] = j - start
        start = -1
    else:
      if start == -1:
        start = j

result = 0
for i in range(h):
  yokoi = yoko[i]
  tatei = tate[i]
  for j in range(w):
    t = yokoi[j] + tatei[j] - 1
    if t > result:
      result = t

print(result)


### FIXED CODE ###

h, w = map(int, input().split())
s = [input() + '#' for _ in range(h)]
s.append('#' * w)

yoko = [[0] * w for _ in range(h)]
for i in range(h):
  if s[i][0] == '.':
    start = 0
  else:
    start = -1
  for j in range(1, w + 1):
    if s[i][j] == '#':
      if start != -1:
        for k in range(start, j):
          yoko[i][k] = j - start
        start = -1
    else:
      if start == -1:
        start = j

tate = [[0] * w for _ in range(h)]
for i in range(w):
  if s[0][i] == '.':
    start = 0
  else:
    start = -1
  for j in range(1, h + 1):
    if s[j][i] == '#':
      if start != -1:
        for k in range(start, j):
          tate[k][i] = j - start
        start = -1
    else:
      if start == -1:
        start = j
result = 0
for i in range(h):
  for j in range(w):
    t = yoko[i][j] + tate[i][j] - 1
    if t > result:
      result = t

print(result)
mod=10**9+7
import math
n=int(input())
ans=1
l=[0]*n
for ii in range(n,2,-1):
  i=ii
  for j in range(2,int(math.sqrt(i))+1):
    if i%j==0:
      cnt=0
      while  i%j==0:
        snt+=1;i//=j
      l[i-1]+=cnt
  if i!=1:
    l[i-1]+=1
for i in l:
  ans+=(i+1)
  ans%=mod
print(ans)


### FIXED CODE ###

mod=10**9+7
import math
n=int(input())
ans=1
l=[0]*n
for ii in range(2,n+1):
  i=ii
  for j in range(2,int(math.sqrt(i))+1):
    if i%j==0:
      cnt=0
      while  i%j==0:
        cnt+=1;i//=j
      l[j-1]+=cnt
  if i!=1:
    l[i-1]+=1
for i in l:
  ans*=(i+1)
  ans%=mod
print(ans)
a = input()
b = input()
printint(a * b)

### FIXED CODE ###

a,b=map(int,input().split())
print(a*b)
def fibona(x):
    import math
    from decimal import Decimal
    return Decimal(((1/2+math.sqrt(5)/2)**(x+1))-((1/2-math.sqrt(5)/2)**(x+1))) // Decimal(math.sqrt(5))

def main():
    n, m = map(int,input().split())
    mlis = []
    for _ in range(m):
        a = int(input())
        mlis.append(a)
    ans = 1
    mae = -1

    for i in range(m):

        broken = mlis[i]
        if mae == broken - 1:
            print(0)
            exit()

        nobori = (broken-1) - (mae+1)
        if nobori == 0:
            ans *= 1
            mae = broken
        else:
            ans *= fibona(nobori)
            ans %= (10 ** 9 + 7)
            mae = broken

    nobori = n - (mae+1)
    ans *= fibona(nobori) 
    ans %= (10 ** 9 + 7)
    print(int(ans))



if __name__ == "__main__":
    main()

### FIXED CODE ###

from itertools import product

def mat2_mul(X, Y):
	z = [[0, 0], [0, 0]]
	for (i, j, k) in product(range(2), range(2), range(2)):
		z[i][j] += X[i][k] * Y[k][j]
	return z

def mat2_pow(X, n):
	if n == 0:
		return [[1, 0], [0, 1]]
	elif n % 2:
		return mat2_mul(X, mat2_pow(X, n - 1))
	else:
		half_pow = mat2_pow(X, n / 2)
		return mat2_mul(half_pow, half_pow)

def fibona(n):
	if n == 0:
		return 0
	else:
		f = [[0, 1], [1, 1]]
	return mat2_pow(f, n - 1)[1][1]

def main():
    n, m = map(int,input().split())
    mlis = []
    for _ in range(m):
        a = int(input())
        mlis.append(a)
    ans = 1
    mae = 0

    infi = 10 ** 9 + 7
    for num in mlis:
        ans *= fibona(num-mae)
        ans %= infi
        mae = num + 1

    nobori = n - mae + 1
    ans *= fibona(nobori) 
    ans %= infi
    print(int(ans))
    



if __name__ == "__main__":
    main()
n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(n):
  s+=1 if a[i]%2==1
print('YES' if s%2==0 else 'NO')

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(n):
  if a[i]%2==1:
    s+=1
print('YES' if s%2==0 else 'NO')
N, K = map(int, input().split())
numbers = list(map(int, input().split()))

maxvalue = 0
for i in range(N+1-K):
  number_sum = list(sum(numbers[i:i+K]))
    
answer = (max(number_sum) + K) / 2
print(answer)


### FIXED CODE ###

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

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)
8 8
1 2
3 4
1 5
2 8
3 7
5 2
4 1
6 8

### FIXED CODE ###

N, M = map(int, input().split())
adj_nums = [0 for i in range(N)]
for i in range(M):
    a, b = map(int, input().split())
    adj_nums[a-1] += 1
    adj_nums[b-1] += 1

for i in adj_nums:
    print(i)
print(int(input()%1000)

### FIXED CODE ###

n = int(input())
bez = 1000
while bez < n:
    bez += 1000
print(bez-n)
N=int(input())
A=input().split(' ')

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

num=0
for i in range(N):
	plus=0
	xor=0
	for j in range(N-i):
		plus=plus+A[i+j]
		xor=xor^A[i+j]
		if plus==xor:
			num=num+1
		else:
			break

print(num)


### FIXED CODE ###

N=int(input())
S=input()

arr=[]
num=0
for i in range(N-1):
	if S[i+1]=='E':
		num=num+1

arr.append(num)

for i in range(N-1):
	if S[i]=='W':
		if S[i+1]=='E':
			arr.append(arr[-1])
		else:
			arr.append(arr[-1]+1)
	elif S[i+1]=='E':
		arr.append(arr[-1]-1)
	else:
		arr.append(arr[-1])

print(min(arr))
MOD = 10**9 + 7
N, K = map(int,input().split())

G = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int,input().split())
    a, b = a-1, b-1

    G[a].append(b)
    G[b].append(a)

# 頂点nowを根とする部分木の色の塗り方 (parが親の時)
#   ただしnowはすでに塗られているとする
def dfs(now, par):
    if K < len(G[now]): return 0

    res = 1

    if par == -1:
        colors = K-1
        for i in range(len(G[now])):
            res *= colors-i
            res %= MOD
    else:
        colors = K-2
        for i in range(len(G[now])-1):
            res *= colors-i
            res %= MOD

    for c in G[now]:
        if c == par: continue
        
        res *= dfs(c, now)
        res %= MOD
    
    return res

print(K * dfs(0,-1) % MOD)

### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)

MOD = 10**9 + 7
N, K = map(int,input().split())

G = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int,input().split())
    a, b = a-1, b-1

    G[a].append(b)
    G[b].append(a)

# 頂点nowを根とする部分木の色の塗り方 (parが親の時)
#   ただしnowはすでに塗られているとする
def dfs(now, par):
    if K < len(G[now]): return 0

    res = 1

    if par == -1:
        colors = K-1
        for i in range(len(G[now])):
            res *= colors-i
            res %= MOD
    else:
        colors = K-2
        for i in range(len(G[now])-1):
            res *= colors-i
            res %= MOD

    for c in G[now]:
        if c == par: continue
        
        res *= dfs(c, now)
        res %= MOD
    
    return res

print(K * dfs(0,-1) % MOD)
x = map(int,input().split(' '))
a = x[0]
b = x[1]
c = x[2]
d = x[3]
e = x[4]
f = x[5]
print round((c*e-b*f)/(a*e-d*b),4),round((c*d-a*f)/(b*d-a*e),4)

### FIXED CODE ###

while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		p = round((c*e-b*f)/(a*e-b*d),4)
		q = round((a*f-c*d)/(a*e-b*d),4)
		x = '%.3f' % p
		y = '%.3f' % q
		if str(x) == '-0.000': x = '%.3f' % 0.000
		if str(y) == '-0.000': y = '%.3f' % 0.000
		print x,y
	except: break
judge = ['A','G', 'C', 'T']
string_list = [i in judge for i in input()]
string = ''.join(string_list).split('False')
print(max([i.count('True') for i in string]))


### FIXED CODE ###

s = input()
lst = ['A', 'G', 'C', 'T']
count = 0
m = 0
for i in s:
  if i in lst:
    count += 1
  else:
    count = 0
  m = max(m, count)
print(m)
s=input()
t=input()
for i in range(len(s)):
	if s[i]!=t[i]:
    	print("No")
        quit()
print("Yes")

### FIXED CODE ###

s=input()
t=input()
for i in range(len(s)):
    if s[i]!=t[i]:
        print("No")
        quit()
print("Yes")
l,r=map(int,input().split())
lst=list(range(l,r+1))
def div(n):
  return n%2019
lst1=map(div,lst)
lst1.sort()
print(lst1[0]*lst1[1])
  


### FIXED CODE ###

import sys
l,r=map(int,input().split())

if 2018<=r-l:
  print(0)
  sys.exit()

L=l%2019
R=r%2019
m=2018

if L>R:
  print(0)
  sys.exit()

  
for i in range(L,R):
  for j in range(i+1,R+1):
    m=min((i*j)%2019,m)

print(m)
n = input()

if(n%2 == 0:
	n= n/2
else:
   n = (n+1)/2
   
print(n)

### FIXED CODE ###


n = input()
n = int(n)
if(n%2 == 0):
	n= n/2
else:
    n = (n+1)/2
   
print(round(n))