Harryxun/stf_run huggingface dataset:
from math import ceil


def main(N, A, B, C, D, E):
    loads = [A, B, C, D, E]
    min_val = min(loads)
    min_index = loads.index(min_val)

    res = min_index + ceil(N / min_val) + (5 - (min_index + 1))

    return res


if __name__ == "__main__":
    N = input()
    A = input()
    B = input()
    C = input()
    D = input()
    E = input()
    print(main(N, A, B, C, D, E))


### FIXED CODE ###

from math import ceil


def main(N, A, B, C, D, E):
    loads = [A, B, C, D, E]
    min_val = min(loads)
    min_index = loads.index(min_val)

    res = min_index + ceil(N / min_val) + (5 - (min_index + 1))

    return res


if __name__ == "__main__":
    N = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())
    print(main(N, A, B, C, D, E))
n = int(input())
P = list(map(int, input().split()))
count = 0
for i in range(n-2):
  count += (min(p[i], p[i+2]) < p[i+1] < max(p[i], p[i+2]))
print(count)

### FIXED CODE ###

n = int(input())
p = list(map(int, input().split()))
count = 0
for i in range(n-2):
  count += (min(p[i], p[i+2]) < p[i+1] < max(p[i], p[i+2]))
print(count)
from itertools import combinations
n, k = map(int, input().split())
nc2 = (n - 1) * (n - 2) // 2
if nc2 < k:
  print('-1')
  exit()
print(n - 1 + (nc2 - k))  # M
for i in range(2, n+1):
  print(f'1 {i}')
for i in range(-1 + (nc2 - k)):
  combs = list(combinations(range(2, n), 2))
  print(f'{combs[i][0]} {combs[i][1]}')


### FIXED CODE ###

from itertools import combinations
n, k = map(int, input().split())
nc2 = (n - 1) * (n - 2) // 2
if nc2 < k:
  print('-1')
  exit()
print(n - 1 + (nc2 - k))  # M
for i in range(2, n+1):
  print(f'1 {i}')
for i in range(nc2 - k):
  combs = list(combinations(range(2, n+1), 2))
  print(f'{combs[i][0]} {combs[i][1]}')
a, s = input().split()
print(s if int(a) >= 3200 else "red")

### FIXED CODE ###

a = int(input())
s = input()
print(s if a >= 3200 else "red")
def solve():
    s = int(input())
    w = int(input())
    
    if (w >= s):
        print('unsafe')
    else :
        print('safe')
    
    return 

if __name__ == '__main__':
    solve()

### FIXED CODE ###

import sys

def solve():
    i = input()
    s, w = i.split()
    s = int(s)
    w = int(w)
    
    if (w >= s):
        print('unsafe')
    else :
        print('safe')
    
    return 

if __name__ == '__main__':
    solve()
turn = int(raw_input())
taro = 0
hanako = 0
for i in range(turn):
    t_card, h_card = [raw_input().split()]
    if t_card > h_card:
        taro += 3
    elif t_card < h_card:
        hanako += 3
    else:
        taro += 1
        hanako += 1
print taro, hanako

### FIXED CODE ###

turn = int(raw_input())
taro = hanako = 0
for i in range(turn):
    (t_card, h_card) = raw_input().split()
    if t_card > h_card:
        taro += 3
    elif t_card < h_card:
        hanako += 3
    else:
        taro += 1
        hanako += 1
print taro, hanako
def solve():
  n = int(input())
  p = list(int(i) for i in input().split())
  ans = 0
  try:
    for i in range(n):
      if p[i-1]>p[i]>p[i+1]:
        ans += 1
      elif p[i-1]<p[i]<p[i+1]:
        ans += 1
  finally:
   print(ans)
solve()

### FIXED CODE ###

def solve():
  n = int(input())
  p = list(int(i) for i in input().split())
  ans = 0
  for i in range(n-2):
   query = [p[i],p[i+1],p[i+2]]
   query.sort()
   if query[1] == p[i+1]:
    ans += 1
  print(ans)
solve()
s = str(input())
Q = int(input())
front = 1
for i in range(Q):
    q = list(map(str, input().split()))
    if q[0] == "1":
        front *= -1
    else:
        if q[1] == "1":
            if front == 1
                s = q[2] + s
            else:
                s = s + q[2]             
        else:
            if front == 1
                s = s + q[2]
            else:
                s = q[2] + s

if front == -1:
    s = s[::-1]
print(s)

### FIXED CODE ###

s = str(input())
Q = int(input())
forward = 1
front = ""
back = ""

for i in range(Q):
    q = list(input().split())
    if q[0] == "1":
        forward *= -1
    else:
        if q[1] == "1":
            if forward == 1:
                front = q[2] + front
            else:
                back = back + q[2]        
        else:
            if forward == 1:
                back = back + q[2]
            else:
                front = q[2] + front

s = front + s + back
if forward == -1:
    s = s[::-1]
print(s)
N = map(int, input().split())
p = list(map(int, input().split()))
for d in range(X + 1):
  for s in [-1, +1]:
    a = X + s * d
    if p.count(a) == 0:
      print(a)
      exit(0)


### FIXED CODE ###

X,N = map(int, input().split())
p = list(map(int, input().split()))
for d in range(X + 1):
  for s in [-1, +1]:
    a = X + s * d
    if p.count(a) == 0:
      print(a)
      exit(0)
import math

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))


### FIXED CODE ###

def gcd(x, y):
    if x == 0:
        return y
    else:
        return gcd(y % x, x)

def lcm(x, y):
    return (x * y) // gcd(x, y)
a,b = map(int,input().split())

print(lcm(a,b))
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
 
A, B =map(int,input().split())
print(lcm(A, B))

### FIXED CODE ###

import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
 
A, B =map(int,input().split())
print(lcm(A, B))
K,A,B = map(int,input().split())
if A or B % K == 0:
	print("OK")
else:
    print("NG")

### FIXED CODE ###

K=int(input())
A,B=map(int,input().split())
ans="NG"

for i in range(1001):
  if A<=i*K and i*K<=B:
    ans="OK"
    break

print(ans)
import fractions as frac
n=int(input())
t1=int(input())
for i in range(n-1):
    t2=int(input())
    ans=t1*t2/frac.gcd(t1,t2)
    t1=t2
print(int(ans))


### FIXED CODE ###

import fractions as frac
n=int(input())
t=[int(input()) for _ in range(n)]
x=t[0]
ans=t[0]
for i in range(1,n):
    g=frac.gcd(x,t[i])
    ans=x*t[i]//g
    x=ans
print(int(ans))
from collections import deque
import sys

def fnw(n,s):
    sm=deque([])
    if n<=len(s):
        for _ in range(n):
            sm.append(s.popleft())
    return ''.join(sm)

def jfws(s):
    # print(s)
    fws=fnw(5,s)
    # print(fws)
    if fws=='dream':
        fws=fnw(2,s)
        if fws=='er':
            if s[0]=='a':
                s.extendleft(deque(reversed(list(fws))))
        else:
            s.extendleft(deque(reversed(list(fws))))
        return False
    elif fws=='erase':
        fws=fnw(1,s)
        if fws!='r':
            s.appendleft(fws)
        return False
    else:
        return True 

def main(s):
    while bool(s):
        if jfws(s):
            return 'NO'
    return 'YES'

s=deque(sys.stdin.readline().strip())
print(main(s))



### FIXED CODE ###

from collections import deque
import sys

def fnw(n,s):
    sm=deque([])
    if n<=len(s):
        for _ in range(n):
            sm.append(s.popleft())
    return sm

def jfws(s):
    # print(s)
    sm=fnw(5,s)
    # print(sm)
    if ''.join(sm)=='dream':
        sm=fnw(2,s)
        if ''.join(sm)=='er':
            if bool(s):
                if s[0]=='a':
                    s.extendleft(deque(reversed(list(sm))))
        else:
            s.extendleft(deque(reversed(list(sm))))
        return False
    elif ''.join(sm)=='erase':
        sm=fnw(1,s)
        if ''.join(sm)!='r':
            s.extendleft(sm)
        return False
    else:
        return True 

def main(s):
    while len(s)>0:
        if jfws(s):
            return 'NO'
    return 'YES'

s=deque(sys.stdin.readline().strip())
print(main(s))
n = int(input())

def order(a,b):
    return max(len(str(int(a))),len(str(int(b))))
    
ans = [] 
numbers = []

for i in range(1,n):
    if len(numbers) != 0:
        if i > min(numbers):
            break
    if n % i == 0:
        ans.append(order(n/i,i))
        numbers.append(n/i)
        

print(min(ans))
        

### FIXED CODE ###

import math
n = int(input())

def order(a,b):
    return max(len(str(int(a))),len(str(int(b))))
    
ans = [] 


for i in range(1,int(math.ceil(math.sqrt(n)))+1):
    if n % i == 0:
        ans.append(order(n/i,i))

if len(ans) == 0:
    print(1)
else:
    print(min(ans))
if S = 'ABC':
    print('ARC')
else:
    print('ABC')

### FIXED CODE ###

s = input()
print('ARC' if s == 'ABC' else 'ABC')
S=input()
A,B=map(str,input().split())
list=[0,1,2]

if list[0]==A and list[1]==A and list[2]==A or list[0]==B and list[1]==B and list[2]==B:
  print('No')
else:
  print('Yes')

### FIXED CODE ###

def yesno(S):
  if S=="AAA" or S=="BBB":
    return "No"
  else:
    return "Yes"
S=input()
print(yesno(S))
def power_func(a, b, p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p
  
def comb(n, k, p):
  """power_funcを用いて(nCk) mod p を求める"""
  from math import factorial
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a = factorial(n) % p
  b = power_func(factorial(k) % p, p-2, p)
  c = power_func(factorial(n-k) % p, p-2, p)
  return (a*b*c)%p
  
n, a, b = map(int, input().split())

MOD = 10**9 + 7


print((pow(2,n,MOD) - 1 - comb(n, a, MOD) - comb(n, b, MOD))

### FIXED CODE ###

from functools import reduce
  
def comb(n, k, p):
  """power_funcを用いて(nCk) mod p を求める"""
  a = reduce(lambda x,y: x*y%p, range(n,n-k,-1))
  b = reduce(lambda x,y: x*y%p, range(1,k+1))
  return (a*pow(b, p-2, p))%p
  
n, a, b = map(int, input().split())

MOD = 10**9 + 7


print((pow(2,n,MOD) - 1 - comb(n, a, MOD) - comb(n, b, MOD))%MOD)
N=input()
a=sum(map(int,str(N)))
if N%a==0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N=int(input())
n=sum(map(int,str(N)))
print("Yes" if N%n==0 else "No")
print(x^3)


### FIXED CODE ###

x=int(input())
print(x*x*x)
primes = [0, 0] + [1]*996
for i in range(2, 32):
    if primes[i]:
        for j in range(i*i, 998, i):
            primes[j] = 0
while True:
    n = int(input())
    if n == 0:
        break
    m = n
    while not primes[m]:
        m -= 1
    pnum = [i for i in range(m+1) if primes[i]]
    ans = 0
    for i in range(len(pnum)):
        tmp = 0
        for j in range(i, len(pnum)):
            tmp += pnum[j]
            if tmp == n:
                ans += 1
                break
            if tmp > n:
                break
    print(ans)

### FIXED CODE ###

primes = [0, 0] + [1]*9999
for i in range(2, 101):
    if primes[i]:
        for j in range(i*i, 10001, i):
            primes[j] = 0
pnums = [i for i in range(10001) if primes[i]]
while True:
    n = int(input())
    if n == 0:
        break
    m = n
    while not primes[m]:
        m -= 1
    ans = 0
    end = pnums.index(m)+1
    for i in range(end):
        tmp = 0
        for j in range(i, end):
            tmp += pnums[j]
            if tmp == n:
                ans += 1
                break
            if tmp > n:
                break
    print(ans)
from card3.void.stop_watch import stop_watch
import sys
input = sys.stdin.readline
@stop_watch
def main():
    n = int(input())
    s = int(input(), 2)
    pc0 = bin(s).count("1")
    ans = []
    for i in range(n):
        k = 1 << (n - 1 - i)
        x = k ^ s
        if x >= s:
            pc0 += 1
        else:
            pc0 -= 1
        x %= pc0
        cnt = 1
        while x > 0:
            pc = bin(x).count("1")
            x %= pc
            cnt += 1
        ans.append(cnt)
    print("\n".join(str(y) for y in ans))
if __name__ == '__main__':
    main()

### FIXED CODE ###

n = int(input())
s = input()
x = int(s, 2)
pcx = s.count("1")
pc1 = x % (pcx - 1) if pcx > 1 else 0
pc2 = x % (pcx + 1)

def f(j):
    cnt = 0
    while j:
        j %= bin(j).count("1")
        cnt += 1
    return cnt

for i, y in enumerate(s):
    k = n - 1 - i
    if y == "0":
        print(f((pc2 + pow(2, k, pcx + 1)) % (pcx + 1)) + 1)
    elif pcx > 1:
        print(f((pc1 - pow(2, k, pcx - 1)) % (pcx - 1)) + 1)
    else:
        print(0)
h, n = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(n)]

# 最強の魔法の特定
a_max = max(a for a, b in ab)
# 動的計画法用の配列の定義及び初期化
dp = [0]*(h + a_max)

for i in range(h + a_max):
	dp[i] = min(dp[i - a] + b for a, b in ab)

print(min(dp[h:]))

### FIXED CODE ###

h, a = map(int, input().split())

q   = h // a
mod = h % a

if(mod == 0):
  ans = q
else:
  ans = q + 1

print(ans)
n =int(input())
b = list(map(int,input().split()))
a = []
a.append(b[0])
sum = 0


for i in range(n-1):
    if(i>0):
        if(b[i]>=b[i-1]):
            a.append(b[i-1])
        else:
            a.append(b[i])

if(b[-2]>=b[-1]):
    a.append(b[-2])
else:
    a.append(b[-1])

for j in range(n):
    sum += a[j]

print(sum)


### FIXED CODE ###


n =int(input())
b = list(map(int,input().split()))
a = []
a.append(b[0])
sum = 0


for i in range(n-1):
    if(i>0):
        if(b[i]>=b[i-1]):
            a.append(b[i-1])
        else:
            a.append(b[i])

if(a[-1]>=b[-1]):
    a.append(a[-1])
else:
    a.append(b[-1])

for j in range(n):
    sum += a[j]

print(sum)
a, b, c = map(long, input().split())
if(a * b * 4 < (c - a - b)**2):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

a, b, c = map(int, input().split())
if(c - a - b >= 0 and a * b * 4 < (c - a - b)**2):
    print("Yes")
else:
    print("No")
import math

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

gcd=math.gcd(A,B)
val=1
ans=0
for i in range(1,gcd+1):
  if gcd%i==0:
    if math.gcd(i,val)==1:
      ans+=1
      val*=i
print(ans)

### FIXED CODE ###

def gcd(a,b): # 最大公約数を求める
  while b:
    a,b=b,a%b
  return abs(a)
  
def solve(A:int, B:int):
  a=gcd(A,B)
  ap=a
  ct=0
  x=2
  if a%x==0:
    ct+=1
    while a%x==0:
      a=a//x
  
  x=3
  while x*x<ap+1:
    if a%x==0:
      ct+=1
      while a%x==0:
        a=a//x
    x+=2
  
  if a!=1:
    ct+=1
  print(ct+1)
  
  return

def main():
  A,B=map(int,input().split())
  solve(A,B)

if __name__=="__main__":
  main()
dg = input().split(“ “);
d = int(dg[0]);
g = int(dg[1]);
p = [0]*d;
c = [0]*d;
for i in range(d) :
    s = input().split(“ “);
    p[i] = int(s[0]);
    c[i] = int(s[1]);

ans = 0;
for i in range(sum(p)) :
    sump = 0;
    for j in range(len(p)) :
        all = 0;
        for m in range(p[j]) :
            if(i & 2**(sump+m)>>(sump+m)) :
                ans += (j+1)*100;
                all += 1;
        if(all == p[j]) :
            ans += c[j];
        sump += p[i];
print(ans);

### FIXED CODE ###

dg = input().split(' ');
d = int(dg[0]);
g = int(dg[1]);
p = [0]*d;
c = [0]*d;
for i in range(d) :
    s = input().split(' ');
    p[i] = int(s[0]);
    c[i] = int(s[1]);

ans = sum(p);
for i in range(2**d) :
    sumpoint = 0;
    luck = -1;
    point = 0;
    for j in range(d-1,-1,-1) :
        if((i & 2**j)>>j) :
            sumpoint += (j+1)*100*p[j] + c[j];
            point += p[j];
        elif(luck<0) :
            luck = j
    k = 0;
    while k < p[luck] and sumpoint < g :
        sumpoint += (luck+1)*100;
        point += 1;
        k+= 1;
    if sumpoint >= g and point < ans :
        ans = point;

print(ans);
N = int(input())

s = input()

if N < 1000:
    print('ABC')

elif 1000 <= N <= 1998:
    print('ABD')

### FIXED CODE ###

N = int(input())

if N < 1000:
    print('ABC')

elif 1000 <= N <= 1998:
    print('ABD')
a,b=map(int,input().split())
if a+b>=10:
  print('error')
else:
  print(a+b

### FIXED CODE ###

a,b=map(int,input().split())
if a+b>=10:
  print('error')
else:
  print(a+b)
import sys
    N, M = map(int, input().split())
    routes = []
    for i in range(M):
        a, b = map(int, input().split())
        routes.append([a, b])
    m = []
    for r in routes:
        if r[0] == 1:
            m.append(r[1])
    for r in routes:
        if r[0] in m:
            if r[1] == N:
                print('POSSIBLE')
                sys.exit()
    print('IMPOSSIBLE')

### FIXED CODE ###

import sys
N, M = map(int, input().split())
m = set()
m2 = set()
for i in range(M):
    a, b = map(int, input().split())
    if a == 1:
        m.add(b)
    if b == N:
        m2.add(a)
for me in m:
    if me in m2:
        print('POSSIBLE')
        sys.exit()
print('IMPOSSIBLE')
def resolve():
	s = input()
	a = float('inf')
	z = 0
	for i in s:
		if i == 'A':
			a = min(a, i)
		if i == 'Z':
			z = max(z, i)
	print(z - a + 1)
resolve()

### FIXED CODE ###

def resolve():
	s = list(input())
	b = -1
	e = -1
	for i in range(len(s)):
		if s[i] == 'A' and b < 0:
			b = i
		if s[i] == 'Z':
			e = i
	if b == -1 or e == -1:
		print(0)
	else:
		print(e-b+1)
resolve()
INF = 10 ** 9
n = int(input())
h = [int(x) for x in input().split()]
memo = [-1]*n

def dp(i):
    if i == 0:
        return 0
    if i < 0:
        return INF
    if memo[i] != -1:
        return memo[i]
    if i == 1:
        memo[i] = abs(h[i] - h[i-1])
        return memo[i]
    memo[i] = min(dp(i-1)+abs(h[i]-h[i-1]), dp(i-2)+abs(h[i]-h[i-2]))
    return memo[i]

print(dp(n-1))

### FIXED CODE ###

# importing the sys module 
import sys 
  
# the setrecursionlimit function is 
# used to modify the default recursion 
# limit set by python. Using this,  
# we can increase the recursion limit 
# to satisfy our needs 
  
sys.setrecursionlimit(10**6) 
n = int(input())
h = [int(x) for x in input().split()]
memo = [-1]*n

def dp(i):
    if i == 0:
        return 0
    if i < 0:
        return 10**10
    if memo[i] != -1:
        return memo[i]
    if i == 1:
        memo[i] = abs(h[i] - h[i-1])
        return memo[i]
    memo[i] = min(dp(i-1)+abs(h[i]-h[i-1]), dp(i-2)+abs(h[i]-h[i-2]))
    return memo[i]

print(dp(n-1))
S=input()
if S[0]=='A' and S[0].islower():
    p1=True

countc=0
for i in range(2,len(S)-2):
    if S[i]=='C' and S[i].islower():
        countc+=1
        nc=i
        
if countc==1:
    p2=True

if p1==True and p2==True:
    b=0
    for i in range(len(S)):
        if i==0 or i==nc:
            pass
        else:
            if S[i].islower()==False:
                b+=1

if p1==True and p2==True and b==0:
    print('AC')        
else:
    print('WA')

### FIXED CODE ###

S=input()

cc=0
nc=0
for i in range(2,len(S)-1):
    if S[i]=='C' and S[i].islower()==False:
        cc+=1
        nc=i

if cc==1 and not nc==0:
    p1=True
else:
    p1=False

if S[0]=='A' and S[0].islower()==False:
    p2=True
else:
    p2=False

bc=0
for i in range(len(S)):
    if i==0 or i==nc:
        pass
    else:
        if S[i].islower()==False:
            bc+=1

if p1==True and p2==True and bc==0:
    print('AC')

else:
    print('WA')
K,M=mao(int,input().split())
if K*500>=M:
  print("Yes")
else:
  print("No")
  

### FIXED CODE ###

K,M=map(int,input().split())
if K*500>=M:
  print("Yes")
else:
  print("No")
import numpy as np

r = input()

a = r**2*np.pi
b = r*2*np.pi

print a,b

### FIXED CODE ###

import math 

r = input()

a = r**2*math.pi
b = r*2*math.pi

print ("%f %f" %(a,b))
S = input()
T = input()

i = 0
j = 0
ss = list()
tt = list()
slist = list()
tlist = list()

if len(s) == len(t):
   for s in S:
      if s in slist:
         ss.append(slist[s])
      else:
         ss.append(i)
         slist.append(s)
         i += 1

   for t in T:
      if t in tlist:
         tt.append(tlist[t])
      else:
         tt.append(j)
         tlist.append(t)
         j += 1

   if ss == tt:
      print("Yes")
   else:
      print("No")
else:
   print("No")
      
      
         


### FIXED CODE ###

S = input()
T = input()

i = 0
j = 0
ss = list()
tt = list()
slist = list()
tlist = list()

if len(S) == len(T):
   for s in S:
      if s in slist:
         ss.append(slist.index(s))
      else:
         ss.append(i)
         slist.append(s)
         i += 1

   for t in T:
      if t in tlist:
         tt.append(tlist.index(t))
      else:
         tt.append(j)
         tlist.append(t)
         j += 1

   if ss == tt:
      print("Yes")
   else:
      print("No")
else:
   print("No")
a=int(input())
s=input()
if a>=3200:
   print(s)
if a<3200:
   print("red")

### FIXED CODE ###

a,b=map(int,input().split())
if a>b:print(a+a-1)
elif b>a:print(b+b-1)
else:
  print(a+b)
n, a, b = map(int, input().split())
MOD = 10**9 + 7

res = 0

def comb(n, k):
    """nCkを計算する関数"""
    fact = [1] * (n+1)
    for i in range(1, n+1):
        fact[i] = fact[i-1] * i % MOD

    # k!と(n-k)!の逆元はそれぞれ、(k!) ** (MOD-2), (n-k)!**(MOD-2)
    res = fact[n] * pow(fact[k], -1, MOD) * pow(fact[n-k], -1, MOD)
    return res % MOD


for i in range(n):
    if i != a and i != b:
        res += comb(n, i)

print(res)

### FIXED CODE ###

#!/usr/bin/env python3

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

MOD = 10**9 + 7
# 二項展開より 2**n - 1 - nCa - nCb を MOD 10**9 + 7 で求めればよい


def combination(n, a):
    # nCk = n! / k! (n-k)! のうち、 n!/(n-k)! を計算する
    res = 1
    div = 1
    for i in range(a):
        res *= n-i
        res %= MOD
        div *= a - i
        div %= MOD

    # print(f'n {n}, a {a}, res {res}, div {div}')
    res = (res * pow(div, MOD-2, MOD)) % MOD
    return res


count = (pow(2, n, MOD) - 1 - combination(n, a) - combination(n, b)) % MOD
print(count)
N,M=map(int,input().split())
A=[-1]*N
k=0
for i in range(M):
  L=list(map(int,input().split()))
  if A[L[0]-1]==-1:
    A[L[0]-1]=L[1]
  else:
    if A[L[0]-1]!=L[1]:
      k=1
      break
    else:
      continue
if (k=1) or (N!=1 and A[0]==0):
  print(-1)
else:
  A=""
  if A[0]==-1:
    A[0]=1
  if N!=1:
    for i in range(N):
      if A[i]==-1:
        A[i]=0
      S+=str(A[i])
print(int(S))
      
  


  

### FIXED CODE ###

n,m = map(int,input().split())
s = list(list(map(int,input().split())) for i in range(m))
x = [-1]*n
b = True
for i in range(m):
    if x[s[i][0]-1] == -1 or x[s[i][0]-1] == s[i][1]:
        x[s[i][0]-1] = s[i][1]
    else:
        b = False
for j in range(n):
    if x[j] == -1:
        if len(x) != 1 and j == 0:
            x[j] = 1
        else:
            x[j] = 0
if len(x) != 1 and x[0] == 0:
    b = False

if b:
  S=""
  for o in range(n):
    S+=str(x[o])
  print(int(S))
else:
  print(-1)
x=input()
print(x**3)


### FIXED CODE ###

N = int(input())
print(N**3)
from math import ceil
N = int(input())
ratio = [tuple(map(int, input().split())) for _ in range(N)]
t,a = 1,1

for nt,na in ratio:
    r = 1
    if nt<t:
        r *= ceil(t/nt)
    if na*r<a:
        r *= ceil(a/na)
    na = r*na
    nt = r*nt
    t,a = nt,na
    #print(t, a)
print(t+a)

### FIXED CODE ###

N = int(input())
ratio = [tuple(map(int, input().split())) for _ in range(N)]
t,a = 1,1

for nt,na in ratio:
    if nt<t or na<a:
        r = max((t-1)//nt+1, (a-1)//na+1)
        nt *= r
        na *= r
    t,a = nt,na
    #print(t, a)
print(t+a)
N=int(input())
if N%2==0:
    L=[]
    for i in range(int(N/2)):
        L.append(i*2+1)
        L.append(i*2+1)
        
else:
    L=[0]
    for i in range(1,int((N-1)/2)+1):
        L.append(i*2)
        L.append(i*2)

A=list(map(int,input().split()))
A.sort()

if A==L:
    if N%2==0:
        ans=1
        for j in range(int(N/2)):
            ans*=2
            ans%=(10**9+7)
        print(ans)
    else:
        ans=1
        for j in range(int(N-1)/2):
            ans*=2
            ans%=(10**9+7)
        print(ans)
else:
    print(0)



### FIXED CODE ###

N=int(input())
if N%2==0:
    L=[]
    for i in range(int(N/2)):
        L.append(i*2+1)
        L.append(i*2+1)
        
else:
    L=[0]
    for i in range(1,int((N-1)/2)+1):
        L.append(i*2)
        L.append(i*2)

A=list(map(int,input().split()))
A.sort()

if A==L:
    if N%2==0:
        ans=1
        for j in range(int(N/2)):
            ans*=2
            ans%=(10**9+7)
        print(ans)
    else:
        ans=1
        for j in range(int((N-1)/2)):
            ans*=2
            ans%=(10**9+7)
        print(ans)
else:
    print(0)
A, B, N = map(int, input().split())

x = min(B - 1, N)
ans = int(a * x / b)
print(ans)

### FIXED CODE ###


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

x = min(B - 1, N)
ans = int(A * x / B)
print(ans)
n, k = map(int, input().split())
p = list(map(int, input().split()))
a = sum(p[0:k])
l = [a]
for i in range(n-k):
    a = a-p[i]+p[i+k]
    l.append(a)
print(l)
print((max(l)+k)/2)


### FIXED CODE ###

n=int(input())
s=list(map(int,input().split()))
d=list(set(s))
if len(s)==len(d):
  print("YES")
else:
  print("NO")