Harryxun/stf_run huggingface dataset:
n=int(input())
l=list(map(int,input().split()))
mod=10**9+7
if n%2==0:
    d={i:2 for i in range(1,n,2)}
else:
    d={i:2 for i in range(0,n,2)}
    d[0]=1
print('def:',d)
for a in l:
    if a in d:
        d[a]-=1
    else:
        print(0)
        exit()
    print(a,d)
for i in d.values():
    if i!=0:
        print(0)
        exit()
print(2**(n//2)%mod)


### FIXED CODE ###

n=int(input())
l=list(map(int,input().split()))
mod=10**9+7
if n%2==0:
    d={i:2 for i in range(1,n,2)}
else:
    d={i:2 for i in range(0,n,2)}
    d[0]=1
for a in l:
    if a in d:
        d[a]-=1
    else:
        print(0)
        exit()
for i in d.values():
    if i!=0:
        print(0)
        exit()
print((2**(n//2))%mod)
H, W = map(int, input().split())
s = ['.' * W]
s.append('.' + input() + '.' for i in range(H))
s.append('.' * W)

for h in range(1, H + 1):
    for w in range(1, W + 1):
        if s[h][w] == '#':
            if s[h - 1][w] == '.' and s[h + 1][w] == '.' and s[h][w - 1] == '.' and s[h][w + 1] == '.':
                print('No')
                exit()

print('Yes')


### FIXED CODE ###

H, W = map(int, input().split())
s = [input() for i in range(H)]

# 四隅
# 左上
if s[0][0] == '#':
    if s[0][1] == '.' and s[1][0] == '.':
        print('No')
        exit()
# 右上
if s[0][W - 1] == '#':
    if s[0][W - 2] == '.' and s[1][W - 1] == '.':
        print('No')
        exit()
# 左下
if s[H - 1][0] == '#':
    if s[H - 1][1] == '.' and s[H - 2][0] == '.':
        print('No')
        exit()
# 右下
if s[H - 1][W - 1] == '#':
    if s[H - 1][W - 2] == '.' and s[H - 2][W - 1] == '.':
        print('No')
        exit()

# 上辺
for i in range(1, W - 1):
    if s[0][i] == '#':
        if s[0][i - 1] == '.' and s[0][i + 1] == '.' and s[1][i] == '.':
            print('No')
            exit()

# 下辺
for i in range(1, W - 1):
    if s[H - 1][i] == '#':
        if s[H - 1][i - 1] == '.' and s[H - 1][i + 1] == '.' and s[H - 2][i] == '.':
            print('No')
            exit()

# 左辺
for i in range(1, H - 1):
    if s[i][0] == '#':
        if s[i - 1][0] == '.' and s[i + 1][0] == '.' and s[i][1] == '.':
            print('No')
            exit()

# 右辺
for i in range(1, H - 1):
    if s[i][W - 1] == '#':
        if s[i - 1][W - 1] == '.' and s[i + 1][W - 1] == '.' and s[i][W - 2] == '.':
            print('No')
            exit()

# 中央
for h in range(1, H - 1):
    for w in range(1, W - 1):
        if s[h][w] == '#':
            if s[h - 1][w] == '.' and s[h + 1][w] == '.' and s[h][w - 1] == '.' and s[h][w + 1] == '.':
                print('No')
                exit()

print('Yes')
import sys
N = sys.stdin.readline()
T = map(int,sys.stdin.readline().split())
M = sys.stdin.readline()
sum = sum(T)
PX = []
ansList = list(list())
for i in range(M):
    PX.append(map(int,sys.stdin.readline().split()))
for i in range(T):
    ansList[i] = sum[i] + (T[PX[i][0]] - PX[i][1])
    print(ansList[i])

### FIXED CODE ###

N = input()
T = list(map(int, input().split()))
M = input()
sum = sum(T)
PX = []
ansList = list()
for i in range(int(M)):
    PX.append(list(map(int, input().split())))
for i in range(int(M)):
    ansList.append(sum - (T[PX[i][0]-1] - PX[i][1]))
    print(ansList[i])
s = input()
yymm = False
mmyy = False
first = int(s[:2])
last = int(s[2:])
if first<=12 and first >0:
  mmyy = True
if last <=12 and last>0:
  yymm = True
if mmyy == True and yymm = True:
  print('AMBIGUOUS')
elif mmyy == True and yymm = False:
  print('MMYY')
elif mmyy == False and yymm = True:
  print('YYMM')
else:
  print('NA')

### FIXED CODE ###

s = input()
yymm = False
mmyy = False
first = int(s[:2])
last = int(s[2:])
if first<=12 and first >0:
    mmyy = True
if last <=12 and last>0:
    yymm = True
if mmyy == True and yymm == True:
    print('AMBIGUOUS')
elif mmyy == True and yymm == False:
    print('MMYY')
elif mmyy == False and yymm == True:
    print('YYMM')
else:
    print('NA')
N = int(input())
T = [0 for i in range(N)]
for t in range(N):
    T[t] = int(input())


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


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


def solve(listT):
    listlen = len(listT)
    ans = -1
    while True:
        ans = lcm(listT[listlen - 2], listT[listlen - 1])
        listT.pop(listlen - 1)
        listT.pop(listlen - 2)
        listT.append(ans)
        listlen = len(listT)
        if(listlen == 1):
            break
    return ans

ans = solve(T)
print(ans)


### FIXED CODE ###

N = int(input())
result = 1

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


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


for i in range(0, N):
    num = int(input())
    result = lcm(result, num)
print(int(result))
s = list(input().split())
if s[1] == "+":
  print(int(s[0]) + int(s[2]))
if s[1] == "-":
  print(int(s[0]) - int(s[1]))

### FIXED CODE ###

s = list(input().split())
if s[1] == "+":
  print(int(s[0]) + int(s[2]))
if s[1] == "-":
  print(int(s[0]) - int(s[2]))
s = list(map(str,input().split()))
n = len(s)
ans = []
for i in range(n):
  if i == "B":
    if ans == []:
      continue
    else:
      ans.remove(ans[-1])
  else:
    ans.appned(i)
print("".join(ans))

### FIXED CODE ###

from collections import deque
s = list(str(input()))
ans = deque()
for i in s:
  if i == "B":
    if ans == deque([]):
      continue
    else:
      ans.pop()
  else:
    ans.append(i)
print("".join(ans))
a=int(input())
b=0
c=0
for i in range(1,10)
  if a%i==0:
    b=a/i
    if b<=9:
      c=1
if c==1:
  print("Yes")
else
  print("No")

### FIXED CODE ###

a=int(input())
b=0
c=0
for i in range(1,10):
  if a%i==0:
    b=a/i
    if b<=9:
      c=1
      break
if c==1:
  print("Yes")
else:
  print("No")
INF=1999
H,W=map(int,input().split())
A=[]
for i in range(H):
    A.append(input())
c=[[INF for j in range(W)] for i in range(H)]

for i in range(H):
    for j in range(W):
        if A[i][j]=='#':
            c[i][j]=0
            l=1
            while i-l>=0 and A[i-l][j]=='.':
                c[i-l][j]=min(c[i-l][j],l)
                l+=1
            r=1
            while i+r<=W-1 and A[i+r][j]=='.':
                c[i+r][j]=min(c[i+r][j],r)
                r+=1
            u=1
            while j-u>=0 and A[i][j-u]=='.':
                c[i][j-u]=min(c[i][j-u],u)
                u+=1
            d=1
            while j+d<=H-1 and A[i][j+d]=='.':
                c[i][j+d]=min(c[i][j+d],d)
                d+=1

for i in range(H):
    for j in range(W):
        if 0<c[i][j]<INF:
            l=1
            while i-l>=0 and A[i-l][j]=='.':
                c[i-l][j]=min(c[i-l][j],c[i][j]+l)
                l+=1
            r=1
            while i+r<=W-1 and A[i+r][j]=='.':
                c[i+r][j]=min(c[i+r][j],c[i][j]+r)
                r+=1
            u=1
            while j-u>=0 and A[i][j-u]=='.':
                c[i][j-u]=min(c[i][j-u],c[i][j]+u)
                u+=1
            d=1
            while j+d<=H-1 and A[i][j+d]=='.':
                c[i][j+d]=min(c[i][j+d],c[i][j]+d)
                d+=1

ans=max([max(c[i]) for i in range(H)])

print(ans)                  

### FIXED CODE ###

from collections import deque

class Grid():
    def __init__(self,i,j,isblack):
        self.i=i
        self.j=j
        self.isblack=isblack
        self.distance=0

H,W=map(int,input().split())

g=[]
for i in range(H):
    Ai=input()
    gi=[]    
    for j in range(W):
        gi.append(Grid(i,j,Ai[j]=='#'))
    g.append(gi)

d=deque()

# 黒マスのreachedをTrueにし，dequeに入れる
for row in g:
    for grid in row:
        if grid.isblack:
            d.append(grid)

while d:
    tg=d.popleft()
    i=tg.i
    j=tg.j
    if i>0 and not g[i-1][j].isblack:
        g[i-1][j].isblack=True
        g[i-1][j].distance=tg.distance+1
        d.append(g[i-1][j])
    if i<H-1 and not g[i+1][j].isblack:
        g[i+1][j].isblack=True
        g[i+1][j].distance=tg.distance+1
        d.append(g[i+1][j])
    if j>0 and not g[i][j-1].isblack:
        g[i][j-1].isblack=True
        g[i][j-1].distance=tg.distance+1
        d.append(g[i][j-1])
    if j<W-1 and not g[i][j+1].isblack:
        g[i][j+1].isblack=True
        g[i][j+1].distance=tg.distance+1
        d.append(g[i][j+1])

'''
for row in g:
    for grid in row:
#        print(grid.distance,end=' ')
#    print()
'''

print(max([max([grid.distance for grid in row]) for row in g]))
import sys
input = sys.stdin.readline
N = int(input())
rbg = [0, 0, 0]
ans = 1
for a in [int(a) for a in input().strip().split()]:
    ans = (ans * rbg.count(a)) % (10 ** 9 + 7)
    rbg[rbg.index(a)] = rbg[rbg.index(a)] + 1

print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
N = int(input())
rbg = [0, 0, 0]
ans = 1
A = [int(a) for a in input().strip().split()]
for a in A:
    if rbg.count(a) == 0:
        print(0)
        exit()
    ans = (ans * rbg.count(a)) % (10 ** 9 + 7)
    rbg[rbg.index(a)] += 1

print(ans)
N,M=map(int, input().split())
a = [0]*M
for i in range(M):
  a[i] = int(input())

def memoize(f): #メモ化関数
  table = {}
  def func(*args):
    if not args in table:
      table[args] = f(*args)
    return table[args]
  return func

@memoize
def step(n):
  if n==0:
    return(1)
  elif n==1:
    return(1)
  else:
    return(step(n-1)+step(n-2))
 
if M==0:
  print(step(N))
else:
  b = [0]*(M+1)
  b[0] = step(a[0]-1)
  if M>=2:
    for i in range(M-1):
      if a[i+1]-a[i] == 1:
        b[i+1] = 0
      elif a[i+1]-a[i] == 0:
        b[i+1] = 1
      else:
        b[i+1] = step(a[i+1]-a[i]-2)
  b[M] = step(N-a[M-1]-1)

  answer = 1
  for i in range(M+1):
    answer = answer*b[i]%1000000007
  print(answer)

### FIXED CODE ###

import sys
sys.setrecursionlimit(100000000)

N,M=map(int, input().split())
a = [0]*M
for i in range(M):
  a[i] = int(input())

def memoize(f):
  table = {}
  def func(*args):
    if not args in table:
      table[args] = f(*args)
    return table[args]
  return func

@memoize

def step(n):
  if n==0:
    return(1)
  elif n==1:
    return(1)
  else:
    return((step(n-1)+step(n-2))%1000000007)

if M==0:
  print(step(N))
else:
  b = [0]*(M+1)
  b[0] = step(a[0]-1)
  if M>=2:
    for i in range(M-1):
      if a[i+1]-a[i] == 1:
        b[i+1] = 0
      else:
        b[i+1] = step(a[i+1]-a[i]-2)
  b[M] = step(N-a[M-1]-1)

  answer = 1
  for i in range(M+1):
    answer = answer*b[i]%1000000007
  print(answer)
import sys

for line in sys.stdin:
    try:
        array = [int(x) for x in line.split()]
        array.sort()
        if array[2]**2 == (array[0]**2+array[1]**2):
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

### FIXED CODE ###

import sys

for line in sys.stdin:
    try:
        a,b,c = [int(x) for x in line.split()]
        if (a**2+b**2) == c**2:
            print('YES')
        elif (a**2+c**2) == b**2:
            print('YES')
        elif (b**2+c**2) == a**2:
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue
n,k = map(int,input().split())
s = list(input())

ans  = 0
tran = 0

for i in range(n):
    chk = s[i] + s[i+1]

    if chk == 'LR' or chk == 'RL':
        tran += 1
    else:
        ans += 1

if k*2 >= tran:
    print(n-1)
else:
    print(tran+(k*2))

### FIXED CODE ###

n,k = map(int,input().split())
s = list(input())

ans  = 0
tran = 0

for i in range(n-1):
    chk = s[i] + s[i+1]

    if chk == 'LR' or chk == 'RL':
        tran += 1
    else:
        ans += 1

if k*2 >= tran:
    print(n-1)
else:
    print(ans+(k*2))
import sys

arg = sys.argv
T = int(arg[1])
X = int(arg[2])
t = T / X
print(t)

### FIXED CODE ###

import sys

def main():
    arg = sys.stdin.readline().rstrip().split()
    T = int(arg[0])
    X = int(arg[1])
    t = T / X
    print(t)


if __name__ == "__main__":
    main()
# バケット法を用いる
def kagamiMochi():
	N = int(input())
	d = []
	for _ in range(0, N):
		d.append(int(input()))

	num = [0] * 100
	for i in range(0, N):
		num[d[i]] += 1

	count = 0
	for j in num:
		if j:
			count += 1
	print(count)

kagamiMochi()

### FIXED CODE ###

def kagamiMochi():
	N = int(input())
	d = []
	for _ in range(0, N):
		d.append(int(input()))
	d.sort()
	count = 1
	for j in range(1, N):
		if d[j] != d[j-1]:
			count += 1
	print(count)

kagamiMochi()
h, w = map(int, input().split())
cells = []
cells.append(['.']*(w+2))
for i in range(h):
    l = ['.']
    s = input().split()
    l+=list(s[0])
    l+=['.']
    cells.append(l)
cells.append(['.']*(w+2))

exist_sharp = False
for cell in cells:
    if '#' in cell:
        exist_sharp = True
if not exist_sharp:
    print("No")
    exit()
 
ans = True
for i in range(1,len(cells)-1):
    for j in range(1,len(cells)-1):
        if cells[i][j] == '#':
            if cells[i-1][j] != '#' and cells[i+1][j] != '#' and cells[i][j-1] != '#' and cells[i][j+1] != '#':
                ans = False

if ans: print("Yes")
else: print("No")

### FIXED CODE ###

h, w = map(int, input().split())
cells = []
for i in range(h):
    s = input().split()
    cells.append(s[0])
ans = True
for i in range(1,h-1):
    for j in range(1,w-1):
        if cells[i][j] == '#':
            if cells[i-1][j] != '#' and cells[i+1][j] != '#' and cells[i][j-1] != '#' and cells[i][j+1] != '#':
                ans = False
                break
 
if ans: print("Yes")
else: print("No")
A, B= [int(input() )for _ in range(2)]
S = str(input())

try:
    if (type(int(S[:A]))== int):
        if S[A]=="-": 
            if type(int(S[A+1:]))==int:
                print('Yes')
    else:
        print('No')
except:
    print("No")

### FIXED CODE ###

g = list(map(int,input().split()))
S = str(input())
 
if ((S[:g[0]]+S[g[0]+1:]).isdigit()) &  (S[g[0]]=="-"):
    print("Yes")
else:
    print("No")
import sys
sys.getrecursionlimit()
sys.setrecursionlimit(1000)

l = int(raw_input())

def factorial(l):
    if l == 0:
        return 1
    else:
        return l * factorial(l-1)
integ = factorial(l)
integ = integ
factors = []
i = 1

while(integ >= i):
    if (integ % i) == 0:
        factors.append(i)
    i+=1
print len(factors)
divisor = long(len(factors))
origin =long((10 ** 9) + 7)


### FIXED CODE ###

l = map(int, raw_input().split())
if (l[0] * l[1]) > (l[2] * l[3]):
    print (l[0] * l[1])
    exit()
else:
    print (l[2] *  l[3])
n,m=map(int,input().split())
lst=[list(map(int,input().split()))  for i in range(m)]
o=[i for i in range(n+1)]
os=[1 for i in range(n+1)]
ans=[n*(n-1)//2]
kumi=n*(n-1)//2
def get(x):
  if(x==o[x]):
    return x
  else:
    return get(o[x])
for i in range(m-1,0,-1):
  a=lst[i][0]
  b=lst[i][1]
  oa=get(a)
  ob=get(b)
  if(oa!=ob):
    kumi=kumi-os[oa]*os[ob]
    ans+=[kumi]
    o[oa]=ob
    os[ob]=os[oa]+os[ob]
  else:
    ans+=[kumi]
for i in range(m-1,-1,-1):
  print(ans[i])


### FIXED CODE ###

n,m=map(int,input().split())
ab=[list(map(int,input().split())) for i in range(m)]
class unionfind:
    def __init__(self, n):
        self.n = n
        self.root = [-1]*(n+1)
        self.rnk = [0]*(n+1)
    def find(self, x):
        if(self.root[x] < 0):
            return x
        else:
            self.root[x] = self.find(self.root[x])
            return self.root[x]
    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if(x == y):
            return 
        elif(self.rnk[x] > self.rnk[y]):
            self.root[x] += self.root[y]
            self.root[y] = x
        else:
            self.root[y] += self.root[x]
            self.root[x] = y
            if(self.rnk[x] == self.rnk[y]):
                self.rnk[y] += 1
    def same(self, x, y):
        return self.find(x) == self.find(y)
    def count(self, x):
        return -self.root[self.find(x)]
uf=unionfind(n)
ans=n*(n-1)//2
for i in range(1,m+1):
    a,b=ab[-i]
    ab[-i]=ans
    if(uf.same(a,b)):
        continue
    else:
        ans-=uf.count(a)*uf.count(b)
        uf.unite(a,b)
for i in ab:
    print(i)
num = list(map(int, input().split()))
num.sort()
print(num[0], num[1], num[2]

### FIXED CODE ###

num = list(map(int, input().split()))
num.sort()
print(num[0], num[1], num[2])
n,m=map(int,input().split())
p=[[]for _ in range(n)]
c=[0]*n
for i in range(m):
    x,y=map(int,input().split())
    p[x-1].append(y-1)
from functools import lru_cache
@lru_cache(maxsize=n)
def l(k):
    return max([l(i)for i in p[k]]+[0])+1
print(max([l(i)for i in range(n)])-1)

### FIXED CODE ###

n,m=map(int,input().split())
p=[[]for _ in range(n)]
c=[0]*n
import sys
sys.setrecursionlimit(10**6)
for i in range(m):
    x,y=map(int,input().split())
    p[x-1].append(y-1)
from functools import lru_cache
@lru_cache(maxsize=n)
def l(k):
    return max([l(i)for i in p[k]]+[0])+1
print(max([l(i)for i in range(n)])-1)
n = int(input())
fx = sum([int(i) for i in list(n)])
if n % fx == 0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n = int(input())
fx = sum([int(i) for i in list(str(n))])
if n % fx == 0:
  print("Yes")
else:
  print("No")
INF = 10 ** 20

W,N = map(int,input().split())
coin_list = [1] + [6**i for i in range(1, 7)] + [9**i for i in range(1, 6)]
dp = [INF]*(W+1)
dp[0] = 0
 
for coin in coin_list:
    for i in range(coin,W+1):
        dp[i] = min(dp[i], dp[i-coin]+1)
 
print(dp[W])

### FIXED CODE ###

INF = 10 ** 20

N = int(input())
coin_list = [1] + [6**i for i in range(1, 7)] + [9**i for i in range(1, 6)]
dp = [INF]*(N+1)
dp[0] = 0
 
for coin in coin_list:
    for i in range(coin,N+1):
        dp[i] = min(dp[i], dp[i-coin]+1)
 
print(dp[N])
import bisect
n = int(input())
k = int(input())
array = list(map(int,input().strip().split()))
array.sort()
index = bisect.bisect_left(array,k)
print (index)


### FIXED CODE ###

n = int(input())
w = -(-n // 2)
ans = w/n
print(ans)
import math
from functools import reduce
n,m = map(int,input().split())
a = list(map(int,input().split()))
for i in range(n):
    a[i] = a[i]//2
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
ans = lcm_list(a)
p = 0
i = 1
for i in range(m,1,-1):
    if i%ans == 0 and i //ans %2 ==1:
        break
    if i >ans:break
    
print((i )//2+1)


### FIXED CODE ###

import fractions
from functools import reduce
n,m = map(int,input().split())
a = list(map(int,input().split()))
for i in range(n):
    a[i] = a[i]//2
wa=[]
for i in range(n):
    p=a[i]
    f=0
    while p%2==0:
        p=p//2
        f+=1
    wa.append(f)
if max(wa)!=min(wa):
    print(0)
    exit()
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

lcm = lcm_list(a)#aの要素をすべて2で割った数列の最小公倍数
#にぶんたんさく(lcmをｘ倍してｍを超えないようなギリギリのｘ)
bottom = 0
top = m+1#m//2くらいで十分だけど大きめにとる
while top - bottom > 1:
    middle = (top+bottom )//2
    if lcm * middle <= m:
        bottom = middle
    else:
        top = middle



print(( bottom+1)//2)
# coding: utf-8


def main():
    N = int(input())
    A = list(map(int, input().split()))

    for i in range(N):
        b = int(input())
        tmp = A[i] - b
        if tmp < 0:
            ans += A[i]
            if A[i + 1] < -tmp:
                ans += A[i + 1]
                A[i + 1] = 0
            else:
                ans += -tmp
                A[i + 1] += tmp
        else:
            ans += b

    print(ans)

if __name__ == "__main__":
    main()


### FIXED CODE ###

# coding: utf-8


def main():
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    ans = 0

    for i in range(N):
        tmp = A[i] - B[i]
        if tmp < 0:
            ans += A[i]
            if A[i + 1] < -tmp:
                ans += A[i + 1]
                A[i + 1] = 0
            else:
                ans += -tmp
                A[i + 1] += tmp
        else:
            ans += B[i]

    print(ans)

if __name__ == "__main__":
    main()
N, K = map(int, input().split())
list_A = list(map(int, input().split()))

l = [1]

flag = True

while flag:
    next = list_A[l[-1] - 1]

    if not next in l:
        l.append(next)

    else:
        start = l.index(next)
        roop = len(l) - start
        flag = False

if len(l) == 1:
    print(1)
    exit()

elif len(l) >= K:
    print(l[K])
    exit()

else:
    roop_remainder = (K + 1 - start) % roop
    if roop_remainder == 0:
        print(l[-1])
    else:
        print(l[start + roop_remainder -1])


### FIXED CODE ###

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

l = [1]
s = {1}

while True:
    next = list_A[l[-1] - 1]

    if not next in s:
        l.append(next)
        s.add(next)

    else:
        start = l.index(next)
        roop = len(l) - start
        break

if len(l) == 1:
    print(1)
    exit()

elif len(l) > K:
    print(l[K])
    exit()

else:
    roop_remainder = (K + 1 - start) % roop
    if roop_remainder == 0:
        print(l[-1])
    else:
        print(l[start + roop_remainder -1])
n = map(int, input())
a = map(int, input())
if n%500 < a:
    print('YES')
else
    print('NO')

### FIXED CODE ###

n = int(input())
a = int(input())
if n % 500 <= a:
  print("Yes")
else:
  print("No")
a=input()
b=list(a)
print(b)
x=700
if b[0]==o:
	x=x+100
if b[1]==o:
	x=x+100
if b[2]==o:
	x=x+100:
print(x)

### FIXED CODE ###

# coding: utf-8
a=input()
b=list(a)
x=700
lis={"o":1,"x":0}
for i in b:
  y=lis[i]
  if y==1:
      x=x+100
print(x)
import numpy as np
N,W = map(int,input().split())
WV = [(list(map(int,input().split()))) for _ in range(N)]
DP = np.array([[0]*(W+1) for _ in range(N+1)], dtype=np.int64)

def rec(i,w,v):
    if DP[i][w] != 0:
        return DP[i][w]
    if i == N:
        return v
    if w == 0:
        return v
    else:
        res = rec(i+1,w,v)
        if w-WV[i][0] >= 0:
            res = max(res,rec(i+1,w-WV[i][0],v+WV[i][1]))
        DP[i][w] = res
        return DP[i][w]

rec(0,W,0)
print(np.max(DP))

### FIXED CODE ###

import numpy as np
n,w=map(int,input().split())
 
dp=np.zeros(w+1,np.int64)
for i in range(n):
    w,v = map(int,input().split())
    dp[w:] = np.maximum(dp[w:], dp[:-w] + v)
    
print(np.max(dp))
S = str(input())
if S[1] + S[2] == 'A':
    print('Yes')
elif S[2] + S[3] == 'B':
    print('Yes')
else:
    print('No')

### FIXED CODE ###

S = str(input())
if S[0] == S[1] and S[1] == S[2]:
    print('No')
else:
    print('Yes')
n = int(input())
s = list(map(int, input().strip().split(' ')))
t = n // 2

for i in range(0, t):
    s[i], s[n - i] = s[n - i], s[i]

for i in range(0, len(s)):
    if i != len(s - 1):
        print(s[i], end=" ")
    else:
        print(s[i])



### FIXED CODE ###

n = int(input())
s = list(map(int, input().strip().split(' ')))
t = n // 2

for i in range(0, n // 2):
    s[i], s[n - i - 1] = s[n - i - 1], s[i]

for i in range(0, len(s)):
    if i != len(s) - 1:
        print(s[i], end=" ")
    else:
        print(s[i])
N = input()
if (N[2] == N[3]) and (N[4] == N[5]):
  return True
else:
  return False

### FIXED CODE ###

N = input()
N = str(N)
if (N[2] == N[3]) and (N[4] == N[5]):
    print('Yes')
else:
    print('No')
N = input()
K = input()

out = (N - K) + 1

print(out)

### FIXED CODE ###

NK = input().split()
NK = [int(s) for s in NK]

out = (NK[0] - NK[1]) + 1

print(out)