Harryxun/stf_run huggingface dataset:
from math import factorial
from operator import mul
from functools import reduce
from math import numpy

def c(n,r):
  r = min(n-r,r)
  if r == 0 or r == n:
    return 1
  else:
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under
def num(k): # k段昇る場合の数
  return int((((1+sqrt(5))/2) ** k - ((1+sqrt(5))/2) ** k) / sqrt(5))
  """
  l,r = k // 2, 0
  for i in range(l+1):
    r += c(k-i,i)
    r %= mod
  return r
  """

n,m=map(int,input().split())
mod = 10 ** 9 + 7

if m == 0:
  print(num(n) % mod)
  exit()

a=[int(input()) for i in range(m)] # 壊れてる段

# ここから先 m > 0
a = [-1] + a + [n+1] # len(a)=m+2
sa = [a[i+1]-a[i]-2 for i in range(len(a)-1)]
ans = 1
#print(sa)
for i in sa:
  ans *= num(i)
  ans %= mod
print(ans)


### FIXED CODE ###

n,m = map(int,input().split())
broken = [int(input()) for i in range(m)]
broken.sort()
broken += [0] * (n-m)
index = 0
mod = 10**9 + 7
for i in range(1,n+1):
  if i==1:
    if i != broken[index]:
      a=1
      b=1
    else:
      a=1
      b=0
      index += 1
  else:
    if i == broken[index]:
      a,b=b,0
      index += 1
    else:
      a,b=b,(a+b)%mod
print(b)
N=int(input())
if N%2=1:
  a=(N+1)/2
  print(a)
else:
  b=N/2
  print(N)

### FIXED CODE ###

N=int(input())
if N%2==0:
  a=N/2
  b=a/N
  print(b)
else:
  t=N+1
  c=t/2
  d=c/N
  print(d)
a,b=map(int,input().split())
print((a+b+1)//2)

### FIXED CODE ###

a,b,c,d=map(int,input().split())
print(["Balanced","Left","Right"][a+b>c+d or-(a+b<c+d)])
a = int(input())
b = int(input())
if 2800 <= a and a<3200:
    print("red")
elif 3200 <=a and a <=5000:
    print(b)


### FIXED CODE ###

a = int(input())
b = input()
if 2800 <= a and a<3200:
    print("red")
elif 3200 <=a and a <=5000:
    print(b)
N, M = map(int, input().split())

broken = []
for _ in range(M):
  broken.append(int(input()))

mod = 10 ** 9 + 7
f = [0] * N
f[1] = 1
for i in range(1, N + 1):
  if i in broken:
    if i - 1 in broken:
      print(0)
      exit()
    continue
  f[i] = f[i-2] + f[i-1]
print(f[N] % mod)

### FIXED CODE ###

import sys
 
n, m = list(map(int, input().split()))
if m > 0:
    aaa = set(map(int, sys.stdin))
else:
    aaa = set()
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 1 if 1 not in aaa else 0
MOD = 10 ** 9 + 7
 
for i in range(2, n + 1):
    if i in aaa:
        continue
    dp[i] = (dp[i - 2] + dp[i - 1]) % MOD
print(dp[n])
import sys
sys.setrecursionlimit(10**10)

n = int(input())
info = []
for _ in range(n-1):
    c, s, f = map(int, input().split())
    info.append([c, s, f])
# print(info)

def func(i, low):
    if i == low:
        return info[i][1] + info[i][0]

    return func2(func(i-1, low), info[i][2], info[i][1]) + info[i][0]

def func2(n, f, s):
    if n <= s:
        return s
    if n % f == 0:
        return n
    else:
        return n//f * f + f

# print(func(n-2, 0))
for i in range(n):
    if i == n-1:
        print(0)
    print(func(n-2, i))


### FIXED CODE ###

n = int(input())
C = []
S = []
F = []
for _ in range(n-1):
    c, s, f = map(int, input().split())
    C.append(c)
    S.append(s)
    F.append(f)

def f(n, s, f):
    if n <= s:
        return s
    if n % f == 0:
        return n
    else:
        return n // f * f + f

for i in range(n-1):
    now = S[i] + C[i]
    for j in range(i+1, n-1):
        now = f(now, S[j], F[j]) + C[j]
    print(now)
print(0)
s=input()
if s[3]==s[4] and s[5]==s[6]:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

s=input()
if s[2]==s[3] and s[4]==s[5]:
    print('Yes')
else:
    print('No')
N,K = map(int,input().split(" "))


H = sorted([int(input()) for i in range(N)],reverse=True)


#print(H)

L = []

for k in range(N-K+1):
    #print(k,k+1,k+2)
    
    L.append(H[k]-H[k+K])

print(min(L))


### FIXED CODE ###

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


H = sorted([int(input()) for i in range(N)],reverse=True)


#print(H)

L = []

for k in range(N-K+1):
    #print(k,k+1,k+2,k+K)
    
    L.append(H[k]-H[k+K-1])

print(min(L))
d = {}
for i in range(1, 100):
    for j in range(i-1, -i-1, -1):
        if i ** 5 - j ** 5 > 10 ** 9:
            print(*d[int(input())])
            exit()
        d[i ** 5 - j ** 5] = (i, j)
    else:
        continue

### FIXED CODE ###

d = {}
for i in range(1, 1000):
    if i ** 5 - (i-1) ** 5 > 10 ** 9:
        break
    for j in range(i-1, -i-1, -1):
        if i ** 5 - j ** 5 > 10 ** 9:
            break
        d[i ** 5 - j ** 5] = (i, j)
print(*d[int(input())])
N,M = map(int,input().split(" "))
L = [0] * M
for i in range(M):
  L(i) = input().split(" ")

memoAC = [0]*N
memoWA = [0]*N
for list in L:
  if list[1]=="AC":
    memoAC[int(list[0])]=1
  else:
    if memoAC[int(list[0])]!=1:
      memoWA[int(list)[0]]+=1
      
AC = sum(memoAC)
WA = sum(memoWA)
print(AC,WA)

### FIXED CODE ###

N,M = map(int,input().split(" "))
L = [0] * M
for i in range(M):
    L[i] = input().split(" ")
    
memoAC = [0] * N
memoWA = [0] * N
for list in L:
    if list[1] == "AC":
        memoAC[int(list[0])-1] = 1
    else:
        if memoAC[int(list[0])-1] != 1:
            memoWA[int(list[0])-1] += 1

for j in range(N):
    if memoAC[j] == 0:
        memoWA[j] = 0

AC = sum(memoAC)
WA = sum(memoWA)
print(AC,WA)
a=list(map(int,input().split()))
for _ in range(int(input()):
  a.sort()
  a[2]*=2
print(sum(a))

### FIXED CODE ###

a=list(map(int,input().split()))
k=int(input())
for _ in range(k):
  a.sort()
  a[2]*=2
print(sum(a))
# -*- encoding: utf-8 -*-
n = int(input().rstrip())
array = list(map(int, input().rstrip().split(' ')))
count = [0] * 100000

for a in array:
    count[a - 1] += 1
    count[a    ] += 1
    count[a + 1] += 1

print(max(count))

### FIXED CODE ###

# -*- encoding: utf-8 -*-
n = int(input().rstrip())
array = sorted(list(map(int, input().split(' '))))
count = [0] * 100002

for a in array:
    count[a - 1] += 1
    count[a    ] += 1
    count[a + 1] += 1

print(max(count))
import functools
import math
N, X = map(int,input().split())
city = list(map(int,input().split()))
X_diff = [0]*N
for i in range(N):
    X_diff[i] = abs(X-city[i])

ans = functools.reduce(math.gcd, X_diff)
print(ans)

### FIXED CODE ###

def gcd(a,b):   #　ユーグリッドの互除法
    if b == 0:
        return a
    return gcd(b, a % b)

N, X = map(int,input().split())
city = list(map(int,input().split()))
X_diff = [0]*N
for i in range(N):
    X_diff[i] = abs(X-city[i])
    
ans = X_diff[0]
for i in range(1,N):
    ans = gcd(ans,X_diff[i])

print(ans)
import sys
n, k = map(int, sys.stdin.buffer.read())
print(n % k)

### FIXED CODE ###

import sys
n, k = map(int, sys.stdin.buffer.read().split())
rem = n % k
print(min(rem, k - rem))
[A,B] = input().split()
max_ab = max(A,B)
min_ab = min(A,B)

r = max_ab
s = min_ab

while s != 0:
  r,s = s,r % s
  if s == 0:
    break
print(int(r*(A/r)*(B/r)))

### FIXED CODE ###

[A,B] = map(int,input().split())
max_ab = max(A,B)
min_ab = min(A,B)

r = max_ab
s = min_ab

while s != 0:
  r,s = s,r % s
  if s == 0:
    break
print(int(r*(A/r)*(B/r)))
n = int(input())
a = list(map(int, input().split()))
k=[]
for i in range(1, n + 1):
  k.append(a.index(i) + 1)
print(k[l] for l in range(n). end =' ')
    


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
B = [0]* N
for i in range(N):
    B[A[i]-1] = i + 1
print(*B)
N,K = map(int,input().split())
H = list(map(int,input().split()))
if K == 0:
  print(sum(H))
else:
  H.sort(reverse = True)
  if N>K:
    for i in range(K):
      del H[i]
    print(sum(H))
  else:
    print(0)


### FIXED CODE ###

N,K = map(int,input().split())
H = list(map(int,input().split()))
if K == 0:
  print(sum(H))
else:
  H.sort(reverse = True)
  if N>K:
    h = H[K:N]
    print(sum(h))
#    for i in range(K):
 #     del H[i]
  #  print(sum(H))
  else:
    print(0)
N, K = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a[:K])
ans = s
for i in range(N-K):
    s = s - s[i] + s[i+K]
    ans = max(s, ans)
print(ans)

### FIXED CODE ###

N, K = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a[:K])
ans = s
for i in range(N-K):
    s = s - a[i] + a[i+K]
    ans = max(s, ans)
print((ans+K)/2)
S = input()
K = int(input())

i = 0
while True:
    if S[i] != '1':
        print(S[i])
        break
    else:
        i += 1

### FIXED CODE ###

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

if S[:K].count('1') == K:
    print(1)
else:
    for s in S[:K]:
        if s != '1':
            print(s)
            break
a, b, t = map(int, input().split(' '))
return (t+0.5)//a*b

### FIXED CODE ###

a, b, t = map(int, input().split(' '))
print(int((t+0.5)//a*b))
n = int(input())
ki = [[]for j in range(n)]
for i in range(n-1):
	    a,b=map(int,input().split())
	    a-=1
	    b-=1
	    ki[a].append([b,i])
	    ki[b].append([a,i])


a=[0]*n
for i in range(n):
	    a[i]= len(ki[i])
print(max(a))
clist=[-1]*(n-1)
visited=[[0]for i in range(n)]
def dfs(now,last,ban_color=-1):
	    color =1
	    for next,id in ki[now]:
	    	    
                     
	    	    if next == last:continue
	    	    if color == ban_color:
	    	    	    color+=1
	    	    clist[id] = color
	    	    dfs(next,now,color)
	    	    
	    	    color+=1
	    	    
dfs(0,-1)
for i in range(n-1):
    print(clist[i])


		

### FIXED CODE ###

S = input()
w = ["SUN","MON","TUE","WED","THU","FRI","SAT","SUN"]
for i in range(7):
    if S == w[i]:
        print(7-i )
import numpy as np
n, m = map(int, input().split())
a = np.array(list(map(int, input().split())))
for i in range(m):
    a[a.argmax()] /= 2
b = np.array([abc // 1 for abc in a])
print(b.sum(b))

### FIXED CODE ###

import heapq
n, m = map(int, input().split())
a = list(map(lambda x: int(x) * (-1), input().split()))
heapq.heapify(a)
for _ in range(m):
    tmp_min = heapq.heappop(a)
    heapq.heappush(a, (-1)*(-tmp_min//2))
print(-sum(a))
# APC001D
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))


from collections import defaultdict
import heapq
n, m = map(int, input().split())
a = list(map(int, input().split()))
ns = defaultdict(set)
for _ in range(m):
    u,v = map(int, input().split())
    ns[u].add(v)
    ns[v].add(u)

score = 0
count = 0
others = []
seen = [False] * n
for start in range(n):
    if seen[start]:
        continue
    count += 1
    q = [start]
    s = [a[start]]
    seen[start] = True
    while q:
        u = q.pop()
        for v in ns[u]:
            if not seen[v]:
                heapq.heappush(s, a[v])
                q.append(v)
                seen[v] = True
    score += heapq.heappop(s)
    others = heapq.merge(others, s)
    
if n<2*(count-1):
    print("Impossible")
elif count==1:
    print(0)
else:
    for _ in range(2*(count-1)-count):
        if len(others)==0:
            print("Impossible")
            break
        score += heapq.heappop(others)
    else:
        print(score)

### FIXED CODE ###

# APC001D
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))


from collections import defaultdict
import heapq
n, m = map(int, input().split())
a = list(map(int, input().split()))
ns = defaultdict(set)
for _ in range(m):
    u,v = map(int, input().split())
    ns[u].add(v)
    ns[v].add(u)

score = 0
count = 0
others = []
seen = [False] * n
for start in range(n):
    if seen[start]:
        continue
    count += 1
    q = [start]
    s = [a[start]]
    seen[start] = True
    while q:
        u = q.pop()
        for v in ns[u]:
            if not seen[v]:
                heapq.heappush(s, a[v])
                q.append(v)
                seen[v] = True
    score += heapq.heappop(s)
    for item in s:
        heapq.heappush(others, item)

if n<2*(count-1):
    print("Impossible")
elif count==1:
    print(0)
else:
    for _ in range(2*(count-1)-count):
        score += heapq.heappop(others)
    else:
        print(score)
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)

### 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)
def gcd(a, b):
    if a == 0: return b
    if b == 0: return a
    return gcd(a % b, b % a)

n, k = map(int, input().split())
arr = list(map(int, input().split()))
g = arr[0]
for e in arr[1:]:
    g = gcd(g, e)

if k <= max(arr) and k//g*g == k:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

### FIXED CODE ###

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

n, k = map(int, input().split())
arr = list(map(int, input().split()))
g = arr[0]
for e in arr[1:]:
    g = gcd(g, e)

if k <= max(arr) and k//g*g == k:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
import sys

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

a_0 = 1
a_1 = 0
a_2 = 0

i = 0
while i < K:
    a_0 = a_1 + a_2
    a_1 = a_0 + a_2
    a_2 = a_0 + a_1
    
    i = i + 1
    
res = (A - B) * (a[0] - a[1])
if res < 10**18:
    print(res)
else:
    print("unfair")


### FIXED CODE ###

import sys

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

a = K % 2
res = (A - B)
if abs(res) > 10**18:
    print("unfair")
if a == 1:
    print(B - A)
elif a == 0:
    print(A - B)
K =input()
A,B = map(int,input().split())	
 
cnt = 0
for i in range(A, B+1):
    if(i % K == 0):
        print("OK")
        cnt += 1
        break
if(cnt == 0):
    print("NG")

### FIXED CODE ###

K = int(input())
A,B = map(int,input().split())
cnt = 0
for i in range(A, B+1):
    if(i % K == 0):
        print("OK")
        cnt += 1
        break
if(cnt == 0):
    print("NG")
for i in range(int(input())):
    point = 0
    out = 0
    runner = [0, 0, 0]
    while True:
        event = input()
        if event == 'HIT':
            if runner[2] == 1:
                point += 1
            if runner[1] == 1:
                runner[2] = 1
            if runner[0] == 1:
                runner[1] = 1
            runner[0] = 1
        elif event == 'HOMERUN':
            point += (sum(runner)+1)
        elif event == 'OUT':
            out += 1
            if out == 3:
                print(point)

### FIXED CODE ###

for i in range(int(input())):
    point = 0
    out = 0
    runner = [0, 0, 0]
    while True:
        event = input()
        if event == 'HIT':
            if runner[2] == 1:
                point += 1
                runner[2] = 0
            if runner[1] == 1:
                runner[2] = 1
                runner[1] = 0
            if runner[0] == 1:
                runner[1] = 1
            runner[0] = 1
        elif event == 'HOMERUN':
            point += (sum(runner)+1)
            runner = [0, 0, 0]
        elif event == 'OUT':
            out += 1
            if out == 3:
                print(point)
                break
A = list(map(input().split()))

cnt = A.conunt('R')
if cnt = 2:
  if A(2) == 'S':
    cnt =1
    

### FIXED CODE ###

A = input()

cnt = A.count('R')
if cnt == 2:
  ccc = A.find('S')
  if ccc == 1:
    cnt =1

print(cnt)
l = input()
m = input()
z = l.split(' ')
M = int(z[1])
N = int(z[0])
print("Yes")
C = (1/(4*M))*N
F = m.split(' ')
X = []
for item in F:
  votes = int(item)
  X.append(votes)

X.sort(reverse=True)
for i in range(M):
  if X[i]<C:
    print("No")
    return
print("Yes")


### FIXED CODE ###

l = input()
m = input()
z = l.split(' ')
M = int(z[1])
N = int(z[0])
F = m.split(' ')
X = []
 
for item in F:
  votes = int(item)
  X.append(votes)

S = sum(X)
C = (S/(4*M))
X.sort(reverse=True)
if X[M-1]<C:
  print("No")
else:
  print("Yes")
from collections import Counter
n, m = map(int, input().split())
A = []
for i in range(m):
    x, y = map(int, input().split())
    A.append(x)
    A.append(y)
C = sorted(Counter(A).most_common())
for i in range(n):
    print(C[i][1])

### FIXED CODE ###

n, m = map(int, input().split())
A = [0] * n

for i in range(m):
    x, y = map(int, input().split())
    A[x-1] += 1
    A[y-1] += 1

for i in range(n):
    print(A[i])
N = int(input())
a = [0]*N
b = [0]*N
c = [0]*N
for i in range(N):
    a[i],b[i],c[i] = map(int,input().split())

inf = -float('inf')
dp = [[inf] * N for _ in range(3)]
dp[0][0] = a[0]
dp[1][0] = b[0]
dp[2][0] = c[0]

for i in range(1,N):
    dp[0][i] = max(dp[1][i-1] + a[i],dp[2][i-1] + a[i])
    dp[1][i] = max(dp[0][i-1] + b[i],dp[2][i-1] + b[i])
    dp[2][i] = max(dp[0][i-1] + c[i],dp[1][i-1] + c[i])

print(max(dp[0][N-1],dp[1][N-1],dp[2][N-1]))


### FIXED CODE ###

N = int(input())
h = list(map(int,input().split()))
dp = [0] * (N+1)
dp[2] = abs(h[1]-h[0])
for i in range(3, N+1):
    dp[i] = min(dp[i-1]+abs(h[i-1]-h[i-2]), dp[i-2]+abs(h[i-1]-h[i-3]))
print(dp[N])
x,k,d=map(int,input().split())
c=0
for i in range(k):
  while x>0 and i<k:
    x-=d
    i+=1
  while x<0 and i<l:
    x+=d
    i+=1
print(abs(x))

### FIXED CODE ###

x,k,d=map(int,input().split())

x=abs(x)
ans=0
if x>=d*k:
  ans=x-k*d
else:
  e= int(x/d)
  k-=e
  x-=e*d
  if k%2==1:
    x=abs(x-d)
  ans=x

print(ans)
nums=[]
nums=input('>>>').split()
print(nums[0]//nums[1],nums[0]%nums[1],nums[0]/nums[1])

### FIXED CODE ###

a,b=map(int,input().split())
print(a//b,a%b,"{0:.5f}".format(a/b))
#66 A - Two Abbreviations
import math
N,M = map(int,input().split())
S = input()
T = input()

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

dist_N = L//N
dist_M = L//M
lis = [0]*(L)
i = 0
for n in range(0,L,dist_N):
    lis[n] = S[i]
    i+=1
j = 0
for m in range(0,L,dist_M):
    if lis[m] == 0:
        lis[m] = T[j]
        j += 1
    else:
        if lis[m] == T[j]:
            j += 1
            continue
        else:
            ans = -1
            break
else:
    ans = L
print(ans)

### FIXED CODE ###

#66 A - Two Abbreviations
import math
N,M = map(int,input().split())
S = input()
T = input()

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

dist_N = L//N
dist_M = L//M

# 同じ位置に書く文字は最大公約数 + 1 だけ存在する
for i in range(GCD):
    # S の s 文字目と T の t 文字目が同じ位置に来る
    s = dist_M * i
    t = dist_N * i
    if S[s] != T[t]:
        ans = -1
        break
else:
    ans = L
print(ans)
while True:
    H,W = [int(i) for i in input().split()]
    if H == 0 and W == 0:
        break
    else:
        for j in list(range(1, H+1, 1)):
            for i in list(range(1, W+1, 1)):
                if i == W:
                    print("#")
                else;
                    print("#", end = "")
        


### FIXED CODE ###

while True:
    H,W = [int(i) for i in input().split()]
    if H == 0 and W == 0:
        break
    else:
        for j in list(range(1, H+1, 1)):
            for i in list(range(1, W+1, 1)):
                if i == W:
                    print("#")
                else:
                    print("#", end = "")
        print("")
N = int(input())
Arr = map(int, input().split())
for i in range(N):
 if i=N-1:
  print(Arr[0])
 else:
  print(Arr[N-1-i] + " ")

### FIXED CODE ###

N = int(input())
Arr = list(map(int, input().split()))
for i in range(N-1):
 print("{} ".format(Arr[N-1-i]), end="")
print(Arr[0])
# coding=utf-8
# Date: 2020-04-07 00:38

get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

fi = open('sample4.in', 'r')
raw_input = fi.readline

n = get()
G = [set() for i in xrange(n + 1)]
for i in xrange(n - 1):
    i, j = gets()
    G[i].add(j)
    G[j].add(i)


def dfs(i):
    G[i], A = None, G[i]
    black, white = 1, 1
    for j in A:
        G[j].remove(i)
        b, w = dfs(j)
        black *= w
        white *= b + w
    return [black, white]
print sum(dfs(1))


### FIXED CODE ###

# coding=utf-8
# Date: 2020-04-07 00:38

import sys
sys.setrecursionlimit(10**6)

get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

n = get()
G = [[] for i in xrange(n + 1)]
for i in xrange(n - 1):
    i, j = gets()
    G[i].append(j)
    G[j].append(i)
mod = 10**9 + 7


def dfs(i, pre=0):
    black, white = 1, 1
    for j in G[i]:
        if j == pre: continue
        b, w = dfs(j, i)
        black = black * w % mod
        white = white * (b + w) % mod
    return [black, white]
print sum(dfs(1)) % mod
N, A, B = map(int, input().split())
S = list(input().split)
 
ok_count = 0
ok_fcount = 0
for s in S:
  if s == a:
    if ok_count < A+B-1
      print('Yes')
      ok_count +=1
      
    else:
      print('No')
      
  elif s == b:
    if ok_count <= A+B-1 and ok_fcount < B-1:
      print('Yes')
      ok_count+=1
      ok_fcount+=1
      
    else:
      print('No')
      
  else:
    print('No')

### FIXED CODE ###

N, A, B = map(int, input().split())
S = input()
 
ok_count = 0
ok_fcount = 0
for i in range(N):
  if S[i] == 'a':
    if ok_count < A+B:
      print('Yes')
      ok_count +=1
      
    else:
      print('No')
      
  elif S[i] == 'b':
    if ok_count < A+B and ok_fcount < B:
      print('Yes')
      ok_count+=1
      ok_fcount+=1
      
    else:
      print('No')
      
  else:
    print('No')
a,b,x=map(int, input().split())
count_n=0
for i in range(a,b+1):
	if i%2==0:
    count_n+=1
print(count_n)

### FIXED CODE ###

a,b,x=map(int, input().split())
if (a%x==0):
    print((b//x-a//x)+1)
else:
    print((b//x-a//x))
N, X = map(int, input())
L = list(map(int, input().split()))
d = 0
ans = 1
for i in range(N):
  d += L[i]
  if d <= X:
    ans += 1

print(ans)

### FIXED CODE ###

N, X = map(int, input().split())
L = list(map(int, input().split()))
d = 0
ans = 1
for i in range(N):
  d += L[i]
  if d <= X:
    ans += 1

print(ans)
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7

N, A = MI()
X = LMI()

# dp[i][j][s] := i番目までのカードからj枚を選んで合計がsになる組み合わせの数
dp = [[[0] * (A * N + 1) for _ in range(N + 1)] for _ in range(N)]
for i in range(N):
    dp[i][0][0] = 1
dp[0][1][X[0]] = 1
for i in range(1, N):
    for j in range(1, i + 2):
        for s in range(A * N + 1):
            if s - X[i] < 0:
                dp[i][j][s] = dp[i - 1][j][s]
            else:
                dp[i][j][s] = dp[i - 1][j][s] + dp[i - 1][j - 1][s - X[i]]

ans = 0
for i in range(1, N + 1):
    ans += dp[N - 1][i][A * i]
print(ans)


### FIXED CODE ###

import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7

N, A = MI()
X = LMI()

# dp[i][j][s] := i番目までのカードからj枚を選んで合計がsになる組み合わせの数
dp = [[[0] * 2502 for _ in range(N + 2)] for _ in range(N + 1)]
for i in range(N):
    dp[i][0][0] = 1
dp[0][1][X[0]] = 1
for i in range(1, N):
    for j in range(1, i + 2):
        for s in range(A * N + 1):
            if s - X[i] < 0:
                dp[i][j][s] = dp[i - 1][j][s]
            else:
                dp[i][j][s] = dp[i - 1][j][s] + dp[i - 1][j - 1][s - X[i]]

ans = 0
for i in range(1, N + 1):
    ans += dp[N - 1][i][A * i]
print(ans)
h, w = map(int. input().split())
d = {}
for i in h:
  for c in input():
    if c in d:
      d[c] += 1
    else:
      d[c] = 1
m = ((w + 1)// 2) * ((h + 1) // 2)
ans = "Yes"
if len(d.keys()) > m:
  ans = "No"
oc = 0
for key in d:
  oc += d[key] % 2
if oc > 1:
  ans = "No"
print(ans)

### FIXED CODE ###

h, w = map(int, input().split())
d = {}
for i in range(h):
  for c in input():
    if c in d:
      d[c] += 1
    else:
      d[c] = 1
m = ((w + 1)// 2) * ((h + 1) // 2)
ans = "Yes"
if len(d.keys()) > m:
  ans = "No"
oc = 0
fc = 0
for key in d:
  oc += d[key] % 2
  fc += d[key] // 4
if oc > 1 or fc < (w//2) * (h//2):
  ans = "No"
print(ans)
n, m = map(int,input().split())
ps = []
nw = 1
mi = m//n
while nw**2 < m:
    if m%nw == 0:
        if mi >= nw:
            ps.append(nw)
        if mi >= m//nw:
            ps.append(m//nw)
    nw += 1
if nw**2 == m and nm <= mi:
    ps.append(nw)

print(max(ps))


### FIXED CODE ###

n, m = map(int,input().split())
ps = [1]
nw = 1
mi = m//n
while nw**2 < m:
    if m%nw == 0:
        if mi >= nw:
            ps.append(nw)
        if mi >= m//nw:
            ps.append(m//nw)
    nw += 1
if nw**2 == m and nw <= mi:
    ps.append(nw)

print(max(ps))