Harryxun/stf_run huggingface dataset:
from bisect import bisect_left
N,K=map(int, input().split())
A=list(map(int, input().split()))
p=10**9+7
A=sorted(A)
thresh=bisect_left(A,0)
minus=A[:thresh]
plus=A[thresh:][::-1]

#print(plus, minus)
if len(plus)==0:
    ans=1
    if K%2!=0:
        minus=minus[::-1]
        for i in range(K):
            ans*=minus[i]
            ans%=p
    else:
        for i in range(K):
            ans*=minus[i]
            ans%=p
    print(ans)
    exit()

if len(minus)==0:
    ans=1
    for i in range(K):
        ans*=plus[i]
        ans%=p
    print(ans)
    exit()

midx=0
pidx=0
ans=1
while K>0 and (0<=midx<len(minus) or 0<=pidx<len(plus)):
    if 0<=midx<len(minus)-1:
        nexmin=minus[midx]*minus[midx+1]
    elif midx==len(minus)-1:
        nexmin=minus[midx]
    else:
        nexmin=-1


    if 0<=pidx<len(plus)-1:
        nexplus=plus[pidx]*plus[pidx+1]
    elif pidx==len(plus)-1:
        nexplus=plus[pidx]
    else:
        nexplus=-float("INF")

    if nexmin>nexplus and K>=2:
        ans*=nexmin
        ans%=p
        midx+=2
        K-=2
    else:
        ans*=plus[pidx]
        ans%=p
        pidx+=1
        K-=1

print(ans)



### FIXED CODE ###

from bisect import bisect_left
N,K=map(int, input().split())
A=list(map(int, input().split()))
p=10**9+7
A=sorted(A)
thresh=bisect_left(A,0)
minus=A[:thresh]
plus=A[thresh:][::-1]

#print(plus, minus)
if len(plus)==0:
    ans=1
    if K%2!=0:
        minus=minus[::-1]
        for i in range(K):
            ans*=minus[i]
            ans%=p
    else:
        for i in range(K):
            ans*=minus[i]
            ans%=p
    print(ans)
    exit()

if len(minus)==0:
    ans=1
    for i in range(K):
        ans*=plus[i]
        ans%=p
    print(ans)
    exit()

midx=0
pidx=0
ans=1

while K>0 and (0<=midx<len(minus) or 0<=pidx<len(plus)):
    if midx==len(minus)-1:
        nexmin=minus[midx]
    elif midx>=len(minus):
        nexmin=-1
    else:
        if K>=2:
            nexmin=minus[midx]*minus[midx+1]
        else:
            nexmin=minus[midx]

    if pidx==len(plus)-1:
        nexplus=plus[pidx]
        fact=nexplus
    elif pidx>=len(plus):
        nexplus=-float("INF")
        fact=nexplus
    else:
        #if plus[pidx+1]!=0:
        #    nexplus=plus[pidx]*plus[pidx+1]
        #else:
        #    nexplus=plus[pidx]
        if K>=2:
            nexplus=plus[pidx]*plus[pidx+1]
        else:
            nexplus=plus[pidx]
        fact=plus[pidx]

    if nexmin>=nexplus:
        ans*=nexmin
        ans%=p
        midx+=2
        K-=2
    else:
        ans*=fact
        ans%=p
        pidx+=1
        K-=1


print(ans)
a = str(input())
if a.isupper() = True:
  print(A)
else:
  print(a)

### FIXED CODE ###

x = str(input())
if x.isupper() == True:
  print("A")
else:
  print("a")
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)
s=int(input())
n=len(s)
now=0
for i in range(n):
  if s[i]=="o":
    now+=1
if now + 15 - n >= 8:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

s=input()
n=len(s)
now=0
for i in range(n):
  if s[i]=="o":
    now+=1
if now + 15 - n >= 8:
  print("YES")
else:
  print("NO")
import numpy as np

mod = 10 ** 9 + 7
S = input()

l = len(S)

dp = np.zeros((l + 1, 13))

# dp = [[0 for i in range(13)] for j in range(l+1)]

dp[0][0] = 1

for i, num in enumerate(S):

    if num == "?":
        for k in range(10):
            for j in range(13):
                dp[i+1][((j * 10) + k) % 13] += dp[i][j]
                # nextdp[((j * 10) + k) % 13] %= mod

    else:
        k = int(num)
        for j in range(13):
            dp[i+1][((j * 10) + k) % 13] += dp[i][j]
            # nextdp[((j * 10) + k) % 13] %= mod

    for j in range(13):
        dp[i+1][j] %= mod

print(int(dp[l][5]))

### FIXED CODE ###

mod = 10 ** 9 + 7

S = input()

dp = [0] * 13

dp[0] = 1

l = len(S)

for i in S:
    nextdp = [0] * 13
    if i == "?":
        for k in range(10):
            for j in range(13):
                nextdp[((j * 10) + k) % 13] += dp[j]
                # nextdp[((j * 10) + k) % 13] %= mod

    else:
        k = int(i)
        for j in range(13):
            nextdp[((j * 10) + k) % 13] += dp[j]
            # nextdp[((j * 10) + k) % 13] %= mod

    dp = [nextdp[i] % mod for i in range(13)]

    # for i in range(13):
    #     dp[i] = nextdp[i] % mod

print(dp[5])
n=int(input())
a=list(map(int,input().split()))
cnt=0
for i in range(n):
    if a[a[i]]==i+1:
      cnt+=1
      break
    else:
      cnt=cnt
print(cnt)


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
cnt=0
for i in range(n):
    if a[a[i]-1]==i+1:
      cnt+=1
    else:
      cnt=cnt
print(cnt//2)
ans = r**2
return int(ans)

### FIXED CODE ###

r = int(input())
print(r**2)
N=int(input())
x=N*800
if N>=15:
    y=200*(N//15)
ans=x-y
print(ans)

### FIXED CODE ###

N=int(input())
x=N*800
y=0
if N>=15:
    y=200*(N//15)
ans=x-y
print(ans)
N, K = map(int,input().split())

from operator import mul
from functools import reduce

def combinations_count(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

div = K - 1  
for i in range(1, K+1):
  split_ball = combinations_count(div, i-1)
  red_ball = N-K-i+1
  red_balls = combinations_count(red_ball+i, i)
  print((split_ball * red_balls) % (10**9 + 7))

### FIXED CODE ###

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

from operator import mul
from functools import reduce

def combinations_count(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

div = K - 1  
for i in range(1, K+1):
  split_ball = combinations_count(div, i-1)
  red_ball = N-K-i+1
  if red_ball<0:
    red_balls = 0
  else:
    red_balls = combinations_count(red_ball+i, i)
  print((split_ball * red_balls) % (10**9 + 7))
# dfs

C = ['dream', 'dreamer', 'erase', 'eraser']
S = input()
L = len(S)


def dfs(x):
    l = len(x)
    if l >= L:
        if S == x:
            return True
        else:
            return False

    match = S[l:l+7]
    for c in C:
        if match.find(c) == 0:
            if dfs(x+c):
                return True
    return False


print('YES' if dfs('') else 'NO')


### FIXED CODE ###

def main():
  s = input()
  dream = False
  erase = False

  while s:
    if s.startswith('dream'):
      s = s[5:]
      dream = True
      erase = False
    elif s.startswith('erase'):
      s = s[5:]
      dream = False
      erase = True
    elif s.startswith('er') and dream:
      s = s[2:]
      dream = False
    elif s.startswith('r') and erase:
      s = s[1:]
      erase = False
    else:
      return False
  
  return True

if main():
  print('YES')
else:
  print('NO')
import copy
N, K = map(int, input().split())
A = list(map(int,input().split()))
P = 0
Q = [0] + [1 for _ in range(N-1)]
R = [-1] + [0 for _ in range(N-1)]
L = 0
for i in range(K):
    P = copy.deepcopy(A[P]-1)
    if Q[P] == 0:
        L = copy.deepcopy(i - R[P])
        break
    if Q[P] == 1:
        R[P] = copy.deepcopy(i)
        Q[P] = 0
S = copy.deepcopy((K - R[P] - 1) % L)
G = 0
for j in range(S + R[P] + 1):
    G = copy.deepcopy(A[G]-1)
print(G+1)


### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int,input().split()))
P = 0
Q = [0] + [1 for _ in range(N-1)]
R = [-1] + [0 for _ in range(N-1)]
L = 0
for i in range(K):
    P = A[P]-1
    if Q[P] == 0:
        L = i - R[P]
        S = (K - R[P] - 1) % L
        G = 0
        for j in range(S + R[P] + 1):
            G = A[G]-1
        print(G+1)
        exit()
    if Q[P] == 1:
        R[P] = i
        Q[P] = 0
print(P+1)
import numpy as np

n = int(input())
A = np.array(list(map(int,input().split())))

balls = np.array([0]*(n+1))

for i in range(1,n+1):
    s = sum(balls[n+1-i::n+1-i])
    if s%2 != A[-i]:
        balls[-i] += 1

#print(balls)

ans = np.where(balls==1)[0].tolist()
if sum(balls):
    print(sum(balls))
    print(*ans)
else:
    print(0)

### FIXED CODE ###

a = int(input())
print(3*a**2)
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy,copy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    candidate = set("3","5","7")
    for i in range(9):
        for c in copy(candidate):
            candidate.add(c+"3")
            candidate.add(c+"5")
            candidate.add(c+"7")
    
    ans = 0
    for c in candidate:
        if int(c)<=N and 0 not in (c.count("3"),c.count("5"),c.count("7")):
            ans += 1
    print(ans)



if __name__ == '__main__':
    main()



### FIXED CODE ###

N = int(input())
digit = len(str(N))
list753 = ["3", "5", "7"]  # string

for i in range(digit):
    for n in list753:
        if len(n) == i:
            list753.append(n + "7")
            list753.append(n + "5")
            list753.append(n + "3")

# print(list753)
counter = 0
for num in list753:
    if int(num) <= N and 0 not in [num.count("3"), num.count("5"), num.count("7")]:
        counter += 1
print(counter)
l, r = map(int, input().split())

all_mod =[]

cnt1 = 0
for i in range(l, r, 1):
    cnt = 0
    for j in range(l + 1, r + 1, 1):
        mod = (i * j) % 2019
        all_mod.append(mod)

        cnt += 1

        if cnt > 2019:
            break

    cnt1 += 1
    if cnt1 > 2019:
        break

print(min(all_mod))

### FIXED CODE ###

x, y, z = input().split()

n = int(x)
a = int(y)
b = int(z)

sum = n * a
print(min(sum, b))
import math
from functools import reduce

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

def lcm_rec(num):
    return reduce(lcm, num, 1)

N = int(input())
T = [0]*N
for i in range(N):
    T[i] = int(input())

ans = lcm_rec(T)
print(ans)


### FIXED CODE ###

import fractions
from functools import reduce

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

def lcm_rec(num):
    return reduce(lcm, num, 1)

N = int(input())
T = [0]*N
for i in range(N):
    T[i] = int(input())

ans = lcm_rec(T)
print(ans)
n=int(input())
ans=[]
l=list(map(int,input().split()))
if min(l)>=0:
    m=1
if max(l)<0:
    m=-2
if max(l)>0 and min(l)<0:
    if max(l)>=-min(l):
        m=max(l)
    else:
        m=min(l)
    mi=l.index(m)
    for i in range(n):
        if m>0:
            if l[i]<0:
                ans.append([mi+1,i+1])
        else:
            if l[i]>0:
                ans.append([mi+1,i+1])
if m>0:
    for i in range(n-1):
        ans.append([i+1,i+2])
else:
    for i in range(n,1,-1):
        ans.append([i,i-1])
print(len(ans))
for i in ans:
    print(*i)

### FIXED CODE ###

n=int(input())
ans=[]
l=list(map(int,input().split()))
if min(l)>=0:
    m=1
if max(l)<=0:
    m=-2
if max(l)>0 and min(l)<0:
    if max(l)>=-min(l):
        m=max(l)
    else:
        m=min(l)
    mi=l.index(m)
    for i in range(n):
        if m>0:
            if l[i]<0:
                ans.append([mi+1,i+1])
        else:
            if l[i]>0:
                ans.append([mi+1,i+1])
if m>0:
    for i in range(n-1):
        ans.append([i+1,i+2])
else:
    for i in range(n,1,-1):
        ans.append([i,i-1])
print(len(ans))
for i in ans:
    print(*i)
a,s = int(input()),input()
if a <= 3200:
  print(s)
else
  print('red')


### FIXED CODE ###

a,s = int(input()),input()
if a >= 3200:
  print(s)
else:
  print('red')
n,m = map(int,input().split())
numList = list(map(int,input().split()))

y = 0
n = 0

for i in len(nunList):
  if  i > 1/(4*m):
    y +=1
  else:
    n +=1
    
if y > m:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n,m = map(int,input().split())
Ai = list(map(int,input().split()))

sum = 0

for i in Ai:
	sum += i

S = sorted(Ai,reverse=True)

if S[m-1] >= sum/(4*m):
  print("Yes")
else:
  print("No")
def fibonacci(n):
    if n<0:
        return 0
    if n==1 or n==0:
        return 1
    else:
        return fibonacci(n-1)+fibonacci(n-2)

N,M=map(int,input().split())
a=[]
for _ in range(0,M):
    a.append(int(input()))
a.append(N+1)
m=1
for i in range(0,M+1):
    if i==0:
        m=fibonacci(a[i]-1)
    else:
        m=m*fibonacci(a[i]-a[i-1]-2)

print(m%(10**9+7))

### FIXED CODE ###

def fibonacci(n):
    if n<0:
        return 0
    else:
        a=1
        b=1
        if n==0:
            return a
        elif n==1:
            return b
        else:
            i=n-2
            while i>=0:
                x=a
                a=b
                b=x+b
                i=i-1
            return b

N,M=map(int,input().split())
a=[]
for _ in range(0,M):
    a.append(int(input()))
a.append(N+1)
m=1
for i in range(0,M+1):
    if i==0:
        m=fibonacci(a[i]-1)
    else:
        m=m*fibonacci(a[i]-a[i-1]-2)

print(m%(10**9+7))
n = int(input())
cl = list(map(int, input().split()))
cl.sort(reverse=True)
MOD = 10**9+7

ans = 0
num = pow(2,n-1,MOD)
inc = pow(2,n-2,MOD)
for i in range(n):
    ans += num*cl[i]
    ans%=MOD
    num += inc
    num%=MOD

ans *= pow(2,n,MOD)
ans%=MOD
print(ans)

### FIXED CODE ###


n = int(input())
cl = list(map(int, input().split()))
cl.sort(reverse=True)
MOD = 10**9+7

ans = 0
num = pow(2,n-1,MOD)
inc = pow(2,n-2,MOD)
for i in range(n):
    ans += num*cl[i]
    ans%=MOD
    num += inc
    num%=MOD

ans *= pow(2,n,MOD)
ans%=MOD
print(ans)
n,k = map(int,input().split())
p = list(map(int,input().split()))

for i in range(n):
    p[i] = (p[i]+1)/2

kset = 0
for j in range(k):
    kset += p[j] 

max = -10000
if n != k:
    for l in range(n-k):
        if kset >= max:
            max = kset
        kset = kset - p[l] + p[l+k]
else:
    max = kset
print(max)

### FIXED CODE ###

s,t = input().split()
a,b = map(int,input().split())
u = input()
if u == s:
  print(a-1,b)
else:
  print(a,b-1)
import sys
input = sys.stdin.readline
K,S=map(int,input().split())
crt=0
for x in range(0,K+1):
  for y in range(0,K+1):
    z=S-x-y
    if 0<=z<=K:
      crt+=1
print(crt)

### FIXED CODE ###

s=input()
print(s.replace(',',' '))
n, h, w = [int(i) for i in input().split()]
print(sum(h <= a and w <= b for a, b in ([int(i) for i in input().split()] for _ in range(n))))

### FIXED CODE ###

import math
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
l = [a, b, c, d, e]
ans = 9
n = 0
j = 0
for i in [i % 10 for i in l]:
    if i != 0 and i < ans:
        ans = i
        n = j
    j += 1
m = l.pop(n)
r = 0
for i in l:
    r += math.ceil(i / 10) * 10
print(r + m)
from collections import deque
N = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
 
    divisors.sort()
    return divisors

q = deque()
for x in make_divisors(N):
  q.append(x)
  
count = 0
done = []
while N != 1:
  x = q.popleft()
  if x == 1:
    continue
  
  if x in done:
    mul = x
    while mul in done:
      mul *= q.popleft()
    
  if N % x == 0:
    N = N // x
    count += 1
    done.append(x)

print(count)

### FIXED CODE ###

from collections import deque
N = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    a.sort()
    return a

q = deque()
prime = prime_factorize(N)
for x in prime:
  q.append(x)

#print(q)
count = 0
done = []
while N != 1:
  break_flag = False
  if len(q) == 0:
    break
  x = q.popleft()
  #print(N, q, x)
  if x == 1:
    continue
  
  if x in done:
    mul = x
    while mul in done:
      if len(q) == 0:
        break_flag = True
        break
      pop = q.popleft()
      #print(x, pop)
      if x != pop:
        #print(x, pop, q)
        q.appendleft(pop)
        #print(q)
        break_flag = True
        break
      mul *= pop
    x = mul
    if break_flag:
      continue
  
  if N % x == 0:
    N = N // x
    count += 1
    done.append(x)

print(count)
#print(done)
import math
N = int(input())
T = []
for i in range(N):
    T.append(int(input()))
def lcm(x, y):
    ans = (x * y)//math.gcd(x, y)
    return ans
g = lcm(T[0],T[1])
if len(T) > 2:
    for i in range(3,N-1):
        g = lcm(g,T[i+1])
    print(g)
else:
    print(g)

### FIXED CODE ###

import math
N = int(input())
T = []

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

for i in range(N):
    T.append(int(input()))

    

if len(T) > 2:
    g = lcm(T[0],T[1])
    for i in range(3,N-1):
        g = lcm(g,T[i+1])
    print(g)
elif len(T) == 2:
    g = lcm(T[0],T[1])
    print(g)
else:
    print(T[0])
"""
#include <stdio.h>
int main(){
  int l, r, ans=99999;
  int lst[99999];
  scanf("%d",&l);
  scanf("%d",&r);
  l %= 2019;
  r %= 2019;
  for(int i=l;i<r;i++){
    for(int j=i+1;j<r+1;j++){
      if(ans>(i*j)%2019){
        ans = (i*j)%2019;
        //printf("%d\n",ans);
      }
    }
  }
  printf("%d\n",ans);

}
/*"""
l, r = map(int, input().split())
l3 = l
l2 = 2019*(l//2019)
r -= l2
l %= 2019

if r>= 2019:
  print(0)
else:
  print(l*(l+1)%2019)

#for i in range()

#lst = []
sum = 9999999999
#lm = 99999999999
#rm = 99999999999
#for 
#print(l%2019)
"""
for i in range(l,r):
  for j in range(i+1,r+1):
    #lst.append(i*j%2019)
    if sum > i*j%2019:
      sum = i*j%2019
print(sum)
"""
#*/

### FIXED CODE ###

n, a, b = map(int, input().split())
lst = [n*a, b]
print(min(lst))
S = input()
one = S.count('1')
zero = len(S) - one
print(min(one, zero) * 2py )

### FIXED CODE ###

S = input()
z = S.count('0')
o = len(S) - z
print(len(S) - abs(z-o))
N = int(input())
x = 800*N - ((N//15)*200)

print (x)

### FIXED CODE ###

a,b,c,d = map(int, input().split())

ab = a * b
cd = c * d

if ab == cd:
    print(int(ab))
elif ab > cd:
    print(int(ab))
else:
    print(int(cd))
A,B = map(int,input().split())
tmp=0

while tmp<3:
  if A > B:
    cnt+=A
    A-=1
  elif A < B:
    cnt+=B
    B-=1
  else:
    cnt+=A
   A-=1
print(cnt)
  

### FIXED CODE ###

A,B = map(int,input().split())
tmp=0
cnt=0

while tmp<2:
  if A > B:
    cnt+=A
    A-=1
    tmp+=1
  elif A < B:
    cnt+=B
    B-=1
    tmp+=1
  else:
    cnt+=A
    A-=1
    tmp+=1
print(cnt)
input = open(0).readline
s = {}
s['A'] = list(input().strip())
s['B'] = list(input().strip())
s['C'] = list(input().strip())

play_order = {'A':'B', 'B':'C', 'C':'A'}

def play(player):
    
    if  len(s[player]) == []:
        play(play_order[player])
    
    next_play = s[player].pop()
    if len(s[player]) == 0:
        print(player)
        return player
    #print(next_play)
    play(next_play.upper())
        
print(play('A'))
        
        




### FIXED CODE ###

input = open(0).readline

x = [0]*3
for i in range(3):
    x[i] = int(input().strip())
a, b, h = x[0], x[1], x[2]
ans = int(((a + b) * h)/2)
print(ans)
s = input()
if s == "RRR":
  print(3)
  elif s == "RRS" or s == "SRR":
    print(2)
    elif s == "SSS":
      print(0)
      else:
        print(1)

### FIXED CODE ###

s = input()
if s == "RRR":
  print(3)
if s == "SSS":
  print(0)
if s == "RRS":
  print(2)
if s == "SRR":
  print(2)
if s == "RSS":
  print(1)
if s == "SRS":
  print(1)
if s == "SSR":
  print(1)
if s == "RSR":
  print(1)
num= input().split()
5count = 0
7count = 0
 
for i in range(len(num)):
  if num[i] == '5':
    5count += 1
  elif num[i] == '7':
    7count += 1
if 5count == 2 and 7count == 1:
  print('YES')
else:
  print('NO')

### FIXED CODE ###

num= input().split()
count5 = 0
count7 = 0
 
for i in range(len(num)):
    if num[i] == '5':
        count5 += 1
    elif num[i] == '7':
        count7 += 1
    else:
        continue
if count5 == 2 and count7 == 1:
    print('YES')
else:
    print('NO')
N = int(input())
n = N
cnt = 0
while n>0:
  n = n//10
  cnt += 1

tmp = "90"*(cnt//2)
tmp = int(tmp[:-1])

if cnt%2!=0:
  tmp += N-int("9"*(cnt-1))

print(tmp)


### FIXED CODE ###

N = int(input())
n = N
cnt = 0
while n>0:
  n = n//10
  cnt += 1

if cnt==1:
  print(N)
else:
  tmp = "90"*(cnt//2)
  tmp = int(tmp[:-1])

  if cnt%2!=0:
    tmp += N-int("9"*(cnt-1))

  print(tmp)
S = str(input())
o=100
x=0
T = 700 + S
print(T)

### FIXED CODE ###

# -*- coding: utf-8 -*-
S = str(input())
T = S.count("o")
print("{}".format(700 + 100 * T))
n=int(input())
s=input()
ans='No'
if n%2==0:
  if s[:n//2]=s[n//2:]:
    ans='Yes'
print(ans)

### FIXED CODE ###

n=int(input())
s=input()
ans='No'
if n%2==0:
  if s[:n//2]==s[n//2:]:
    ans='Yes'
print(ans)
import math


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

dp = [math.inf] * N
dp[0] = 0
for i in range(N):
    for j in (i + 1, i + 2):
        if j < N:
            dp[j] = min(dp[j], dp[i] + abs(h[j] - h[i]))
print(dp[N-1])

### FIXED CODE ###

N = int(raw_input())
h_str = raw_input()
h = []
for h_i in h_str.split(" "):
    h.append(int(h_i))

dp = [10 ** 9 + 1] * N
dp[0] = 0
for i in range(N):
    for j in (i + 1, i + 2):
        if j < N:
            dp[j] = min(dp[j], dp[i] + abs(h[j] - h[i]))
print(dp[N-1])
N = input()
a,b = [int(x) for x in N.split()]
c = a-2*b
d = c if c > 0 else 0
print d

### FIXED CODE ###

N = input()
a,b = [int(x) for x in N.split()]
c = a-2*b
d = c if c > 0 else 0
print(d)
n, a, b = map(int, input().split())
def mod_comb(n, r, mod):
    ans = 1
    for i in range(1, r + 1):
        ans *= n - (i - 1)
        ans %= mod
        ans *= inv[i]
        ans %= mod
    return int(ans)
 p = 10 ** 9 + 7
N = 10 ** 6  # N は必要分だけ用意する
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1]
 
for i in range(2, N + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)
import math
mod = 10 ** 9 + 7
res = pow(2, n, mod) - 1 - mod_comb(n, a, mod) - mod_comb(n, b, mod)
print(res % mod)


### FIXED CODE ###

n, a, b = map(int, input().split())
def mod_comb(n, r, mod):
    ans = 1
    for i in range(1, r + 1):
        ans *= n - (i - 1)
        ans %= mod
        ans *= inv[i]
        ans %= mod
    return int(ans)
p = 10 ** 9 + 7
N = 10 ** 6  # N は必要分だけ用意する
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1]
 
for i in range(2, N + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)
import math
mod = 10 ** 9 + 7
res = pow(2, n, mod) - 1 - mod_comb(n, a, mod) - mod_comb(n, b, mod)
print(res % mod)