Harryxun/stf_run huggingface dataset:
A, B, C = map(int, input().split())
K= int(input()) 
 
 
if (B**K+1>A)&(C>B):
  print("Yes")
elif (B**(K)>A)&(C>B**2) :
  print("Yes")
elif (B**(K-1)>A)&(C>B**3) :
  print("Yes")
elif (B**(K-2)>A)&(C>B**4) :
  print("Yes")
elif (B**(K-3)>A)&(C>B**5) :
  print("Yes")
elif (B**(K-4)>A)&(C>B**6) :
  print("Yes")
elif (B**(K-5)>A)&(C>B**7) :
  print("Yes")
else :
  print("No")

### FIXED CODE ###

s = int(input()) 
 
if 400 <= s <= 599:
  print("8")
elif  600 <= s <=799:
        print("7")
elif  800 <= s <=999:
        print("6")
elif  1000 <= s <=1199:
        print("5")
elif  1200 <= s <=1399:
        print("4")
elif  1400 <= s <=1599:
        print("3")
elif  1600 <= s <=1799:
        print("2")
elif  1800 <= s <=1999:
        print("1")
import math
a,b,c,d = map(int,input().split())

a = math.ceil(a//d)
b = math.ceil(b//c)
if = a<=b:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

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

a = math.ceil(a/d)
b = math.ceil(c/b)
if a<b:
  print('No')
else:
  print('Yes')
N = int(input())
H = list(map(int,input().split()))
hight = []
count = []

# lower...1,higher...0
for n in range(N-1):
    if H[n]>=H[n+1]:
        hight.append(1)
    else:
        hight.append(0)

count.append(hight[0])
for l in range(1,N-1):
    if hight[l]==1:
        count.append(count[l-1]+1)
    else:
        count.append(0)

print(max(count))


### FIXED CODE ###

import sys

N = int(input())
H = list(map(int,input().split()))
hight = []
count = []

if N == 1:
    print(0)
    sys.exit()

# lower...1,higher...0
for n in range(N-1):
    if H[n]>=H[n+1]:
        hight.append(1)
    else:
        hight.append(0)

#print(hight)

count.append(hight[0])
for l in range(1,N-1):
    if hight[l]==1:
        count.append(count[l-1]+1)
    else:
        count.append(0)

#print(count)

print(max(count))
l = [int(x) for x in input().split()]
a = l[0]
b = l[1]
if a < b :
    print("a < b")
elif a > b :
    print("a > b")
else:
    print("a == b")
l = [int(x) for x in input().split()]
a = l[0]
b = l[1]
c = l[2]
if a < b < c:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

l = [int(x) for x in input().split()]
a = l[0]
b = l[1]
c = l[2]
if a < b < c:
    print("Yes")
else:
    print("No")
n, x = map(int, input().split())
l = list(map(int, input().split()))

tmp = 0
cnt = 0
i = 0
while tmp <= x and i <= len(l):
    d = tmp + l[i]
    tmp = d
    cnt += 1
    i += 1

print(cnt)

### FIXED CODE ###

n, x = map(int, input().split())
l = list(map(int, input().split()))

d = []
d.append(0)
for i in range(n):
    d.append(d[i]+l[i])
ans = 0
for i in d:
    if i <= x:
        ans += 1

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

if A >= 13 :
    print(B)
elif A <= 5 :
    print(0)
elif : 5 < A < 13
    print( B/2 )

### FIXED CODE ###

import math

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

if A >= 13 :
    print(B)
elif A <= 5 :
    print(0)
else :
    print( math.floor(B/2) )
def prod(array):
    res = 1
    for a, _ in array:
        res *= a
        res %= MOD
    return res

MOD = 10**9 + 7
N, K = map(int, input().split())
A = []
for a in map(int, input().split()):
    A.append((abs(a), a < 0))
A.sort(reverse=True)
sgn = 0
s0 = -1
lastA = -1
for i, p in enumerate(A[:K]):
    a, s = p
    sgn += s
    if s != s0:
        lastA = i-1
    s0 = s
if sgn%2==0:
    print(prod(A[:K])%MOD)
    exit()
if sgn + sum(s for _, s in A[K:])==N:
    print(-prod(A[-K:])%MOD)
    exit()
lasts = s
if lasts != A[K][1]:
    res = prod(A[:K-1])*A[K][0]
else:
    for i, p in enumerate(A[K:],start=K):
        a, s = p
        if s != lasts:
            firstA = i
    res = max(prod(A[:lastA])*prod(A[lastA+1:K+1]), prod(A[:K-1])*A[firstA][0])
print(res%MOD)

### FIXED CODE ###

def prod(array):
    res = 1
    for a, _ in array:
        res *= a
        res %= MOD
    return res

MOD = 10**9 + 7
N, K = map(int, input().split())
if N==K:
    res = 1
    for a in map(int, input().split()):
        res *= a
        res %= MOD
    print(res)
    exit()
A = []
allsgn = 0
for a in map(int, input().split()):
    A.append((abs(a), a < 0))
    allsgn += a<0
A.sort(reverse=True)
sgn = 0
s0 = -1
lastA = -1
for i, p in enumerate(A[:K]):
    a, s = p
    sgn += s
    if s != s0:
        lastA = i-1
    s0 = s
lasts = s0
if allsgn==N:
    if K%2==1:
        print((-prod(A[-K:]))%MOD)
        exit()
    else:
        print(prod(A[:K])%MOD)
        exit()
if sgn%2==0:
    print(prod(A[:K])%MOD)
    exit()
if lasts != A[K][1]:
    res = prod(A[:K-1])*A[K][0]
else:
    firstA = None
    for i, p in enumerate(A[K:],start=K):
        a, s = p
        if s != lasts:
            firstA = i
            break
    if lastA == -1 or (firstA is not None and A[K][0]/A[lastA][0] < A[firstA][0]/A[K-1][0]):
        res = prod(A[:K - 1]) * A[firstA][0]
    else:
        res = prod(A[:lastA]) * prod(A[lastA + 1:K + 1])
print(res%MOD)
"""
6 3
5 -3 -3 -3 -3 -2

10 7
-10 -10 -10 -10 10 10 10 10 10 10
"""
def B():
    n = int(raw_input())
    s = list(raw_input())
    c = 0
    for i in range(0,len(s)-2):
        if str(s[i]) == "A":
            if str(s[i+1]) == "B":
                if str(s[i+2]) == "C":
                    c = c + 1
    print c


if __name__ == '__main__':
    B()

### FIXED CODE ###

#coding: utf-8

def A():
    k, x = map(int, raw_input().split())
    a = 500 * k
    if a >= x:
        print "Yes"
    else:
        print "No"

if __name__ == '__main__':
    A()
n = int(input())
l = list(map(int, input().split()))

if l.count(max(l)) >= 2:
    print("No")
    b
elif max(l) < sum(l) - max(l):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n = int(input())
l = list(map(int, input().split()))

if max(l) < sum(l)-max(l):
    print("Yes")
else:
    print("No")
K=int(input())
S=input()

def moji(S,K):
    if len(S)<=K:
        print(S)
    else:
        T=""
        for i in range(len(S)):
            if i <K:
                 T+=S[i]
            if i >=K:
                continue
        T+="..."
        print(T)

moji(S,K)

### FIXED CODE ###

N=int(input())

def yomikata(N):
    N_firstdigit=N%10
    if N_firstdigit==3:
        print("bon")
    #elif N_firstdigit==0 or 1 or 6 or 8: このように条件は省略して書いてはだめらしい!
    elif N_firstdigit==0 or N_firstdigit==1 or N_firstdigit==6 or N_firstdigit==8:
        print("pon")
    else:
        print("hon")
        
yomikata(N)
import numpy as np
s = list(input())
x, y = map(int, input().split())

X = [0]
Y = [0]

flag = True
tmp = 0
for i in s:
    if i == 'F':
        tmp += 1
    else:
        if flag:
            X.append(tmp)
        else:
            Y.append(tmp)
        tmp = 0
        flag = not flag

if flag:
    X.append(tmp)
else:
    Y.append(tmp)

# print (X)
# print (Y)

x -= X[1]
X[1] = 0

x = abs(x)
y = abs(y)

total_X = sum(X)
total_Y = sum(Y)

lst_X = np.zeros(total_X + 1)
lst_X[0] = 1
for i in X:
    if i == 0:
        continue
    print (lst_X[i:])
    print (lst_X[:-i])
    lst_X[i:] = max(lst_X[i:], lst_X[:-i])

print (lst_X)

lst_Y = np.zeros(total_Y + 1)
lst_Y[0] = 1
for i in Y:
    if i == 0:
        continue
    lst_Y[i:] = max(lst_Y[i:], lst_Y[:-i])

if x > total_X or y > total_Y:
    print ('No')
    exit()

if (total_X - x) % 2 == (total_Y - y) % 2 == 0 and int(lst_X[(total_X - x) // 2]) == 1 and int(lst_Y[(total_Y - y) // 2]) == 1:
    print ('Yes')
else:
    print ('No')

### FIXED CODE ###

s = list(input())
x, y = map(int, input().split())

X = [0]
Y = [0]

flag = True
tmp = 0
for i in s:
    if i == 'F':
        tmp += 1
    else:
        if flag:
            X.append(tmp)
        else:
            Y.append(tmp)
        tmp = 0
        flag = not flag

if flag:
    X.append(tmp)
else:
    Y.append(tmp)

# print (X)
# print (Y)

x -= X[1]
X[1] = 0

x = abs(x)
y = abs(y)

total_X = sum(X)
total_Y = sum(Y)

lst_X = [0] * (total_X + 1)
lst_X[0] = 1
for i in X:
    if i == 0:
        continue
    for j in range(total_X - i, -1, -1):
        if lst_X[j] == 1:
            lst_X[j + i] = 1

# print (lst_X)

lst_Y = [0] * (total_Y + 1)
lst_Y[0] = 1
for i in Y:
    if i == 0:
        continue
    for j in range(total_Y - i, -1, -1):
        if lst_Y[j] == 1:
            lst_Y[j + i] = 1

# print (lst_Y)
if x > total_X or y > total_Y:
    print ('No')
    exit()

if (total_X - x) % 2 == (total_Y - y) % 2 == 0 and lst_X[(total_X - x) // 2] == 1 and lst_Y[(total_Y - y) // 2]:
    print ('Yes')
else:
    print ('No')
import sys
#sys.setrecursionlimit(450000)
input = sys.stdin.readline

from functools import lru_cache

@lru_cache(maxsize=None)
def Tsundoku(i,j):
    global k
    if dp[i][j]!=None:
        return dp[i][j]
    ans1,ans2 = 0,0
    if i<n and k-a[i]>=0:
        k-=a[i]
        ans1 = 1+Tsundoku(i+1,j)
        k+=a[i]
    if j<m and k-b[j]>=0:
        k-=b[j]
        ans2 = 1+Tsundoku(i,j+1)
        k+=b[j]
    dp[i][j] = max(ans1,ans2)
    return dp[i][j]

n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
dp = [[None]*(m+1) for _ in range(n+1)]
ans = Tsundoku(0,0)
print(ans)

### FIXED CODE ###

from itertools import accumulate

def bs(t):
    l,h = 0,len(b)-1
    while l<=h:
        m = (l+h)//2
        if b[m]<t:
            l=m+1
        elif b[m]>t:
            h=m-1
        else:
            return m
    return h

n,m,k = map(int,input().split())
a = list(accumulate([0]+list(map(int,input().split()))))
b = list(accumulate([0]+list(map(int,input().split()))))
ans = 0
for idx,i in enumerate(a):
    if i<=k:
        #print(idx,bs(k-i))
        ans = max(ans,bs(k-i)+idx)
print(ans)
import itertools

def q49(n, k, h):
    h.sort()
    a = [h[i+k-1]-h[i] for i in range(n-2)]
    return min(a)
            
N, K = [int(i) for i in input().split()]
h = []
for _ in range(N):
    h.append(int(input()))
print(q49(N, K, h))

### FIXED CODE ###

import itertools

def q49(n, k, h):
    h.sort()
    a = [h[i+k-1]-h[i] for i in range(n-k+1)]
    return min(a)
            
N, K = [int(i) for i in input().split()]
h = []
for _ in range(N):
    h.append(int(input()))
print(q49(N, K, h))
input()

count = 0

while all(a % 2 == 0 for a in A):
  A = [a / 2 for a in A]
  count += 1
print(count)

### FIXED CODE ###

input()
A = list(map(int, input().split()))
count = 0
while all(a % 2 == 0 for a in A):
    A = [a/2 for a in A]
    count += 1
print(count)
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

from collections import Counter, defaultdict
c = Counter(a)
n1, n2, n3 = c[1], c[2], c[3]
n0 = c[0]
def glist(*l):
    for num in l:
        []

count = 0
S = sum(a)
for s in range(S+1):
    for i1 in range(s+1):
        for i2 in range((s-i1)//2+1):
            d,m = divmod((s-i1-2*i2), 3)
            if m:
                continue
            i3 = d
            count += 1
            if i1==i2==i3==0:
                sub[i1,i2,i3] = 0
                continue
            ans = 1
            p = 0
            if i1>0:
                ans += i1/n * sub[i1-1,i2,i3]
                p += i1/n
            if i2>0:
                ans += i2/n * sub[i1+1,i2-1,i3]
                p += i2/n
            if i3>0:
                ans += i3/n * sub[i1,i2+1,i3-1]
                p += i3/n
            ans = ans/p
            sub[i1,i2,i3] = ans
print(sub[n1,n2,n3])

### FIXED CODE ###

import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

from collections import Counter, defaultdict
c = Counter(a)
n1, n2, n3 = c[1], c[2], c[3]
n0 = c[0]
def glist(*l, fill=None):
    if len(l)==1:
        return [fill]*l[0]
    ll = l[1:]
    return [glist(*ll) for _ in range(l[0])]

count = 0
S = sum(a)
sub = glist(n1+n2+n3+1,n2+n3+1,n3+1)
sub[0][0][0] = 0
#     for i1 in range(min(n+1, s+1)):
#         for i2 in range(min(n+1, (s-i1)//2+1)):
for i3 in range(n3+1):
    for i2 in range(n2+n3+1-i3):
        for i1 in range(n1+n2+n3 - (i2+i3) + 1):
            if i1==i2==i3==0 or i1+i2+i3>n:
                continue
#             print(i1,i2,i3)
            ans = n
            p = 0
            if i1>0:
                ans += i1 * sub[i1-1][i2][i3]
                p += i1
            if i2>0:
                ans += i2 * sub[i1+1][i2-1][i3]
                p += i2
            if i3>0:
                ans += i3 * sub[i1][i2+1][i3-1]
                p += i3
            ans = ans/p
            sub[i1][i2][i3] = ans
print(sub[n1][n2][n3])
A=input()
 
if A in "7":
  print("Yes")
  
  else:
  	print("No")

### FIXED CODE ###

n = input()
 
print('Yes' if '7' in n else 'No')
import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.floor(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.floor(B/0.1)

if A > B or A < 0 or B < 0 or A > 100 or B > 100:
    return (-1)

if pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)

### FIXED CODE ###

import math

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

pricemax_A = math.floor((A+1)/0.08)
pricemin_A = math.ceil(A/0.08)

pricemax_B = math.floor((B+1)/0.1)
pricemin_B = math.ceil(B/0.1)

if pricemin_A >= pricemin_B and pricemin_A < pricemax_B:
    print(pricemin_A)
elif pricemin_A <= pricemin_B and pricemax_A > pricemin_B:
    print(pricemin_B)
else:
    print(-1)
import numpy as np
import sys

input = sys.stdin.readline

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

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

dp = np.zero(N, dtype=int)

for i in range(1, N):
    start = max(0, i-K)
    dp[i] = min(dp[start:i]+np.abs(H[i]-H[start:i]))

print(dp[N-1])

### FIXED CODE ###

import numpy as np

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

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

dp = np.zeros(N, dtype=int)

for i in range(1, N):
    start = max(0, i-K)
    dp[i] = min(dp[start:i]+np.abs(H[i]-H[start:i]))

print(dp[N-1])
x = int(readline())
y = x // 200
print(10 - y)

### FIXED CODE ###

import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    x = int(readline())
    kyu = 0

    if 400 <= x <= 599:
        kyu = 8
    if 600 <= x <= 799:
        kyu = 7
    if 800 <= x <= 999:
        kyu = 6
    if 1000 <= x <= 1199:
        kyu = 5
    if 1200 <= x <= 1399:
        kyu = 4
    if 1400 <= x <= 1599:
        kyu = 3
    if 1600 <= x <= 1799:
        kyu = 2
    if 1800 <= x <= 1999:
        kyu = 1

    print(kyu)


if __name__ == '__main__':
    main()
from fractions import gcd
n = int(input())
ans = 1
for i in range(n):
  t = int(input())
  ans = a*t//gcd(a, t)
print(ans)

### FIXED CODE ###

def gcd(p, q):
    if p < q:
        p, q = q, p
    while q > 0:
        p, q = q, p%q
    return p

n = int(input())
ans = 1
for i in range(n):
  t = int(input())
  ans = ans*t//gcd(ans, t)
print(ans)
strs = input.split()
print("".join([a[0].upper() for a in strs]))

### FIXED CODE ###

strs = input().split()
print("".join([a[0].upper() for a in strs]))
in = input()
if in == 'ABC':
  print('ARC')
else:
  print('ABC')

### FIXED CODE ###

in_ = input()
if in_ == 'ABC':
  print('ARC')
else:
  print('ABC')
import numpy as np
H,W=map(int,input().split())

A=[list(map(int,input().split())) for _ in range(H)]
B=[list(map(int,input().split())) for _ in range(H)]

#dp[i][j]=マス(i,j)における可能なポイントのリスト
dp=[[[] for _ in range(W)] for _ in range(H)]
dp[0][0].append(0)

for i in range(W+H-1):
  I,J=0,0
  if i < H:
    I=i
    J=0
  else:
    I=H-1
    J=i-H+1
  while I>=0 and J<W:
    sa = A[I][J] - B[I][J]
    for point in dp[I][J]:
      if I!=H-1:
        dp[I+1][J].append(point+sa)
        dp[I+1][J].append(point-sa)
      if J!=W-1:
        dp[I][J+1].append(point+sa)
        dp[I][J+1].append(point-sa)
    I-=1
    J+=1

ans=dp[H-1][W-1]
sa = A[H-1][W-1] - B[H-1][W-1]
res=float("inf")
for p in ans:
  res=min(res,abs(p+sa),abs(p-sa))
print(res)
print(dp[0][1])

### FIXED CODE ###

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

A=[list(map(int,input().split())) for _ in range(H)]
B=[list(map(int,input().split())) for _ in range(H)]

#dp[i][j]=マス(i,j)における可能なポイントのリスト
dp=[[set() for _ in range(W)] for _ in range(H)]
dp[0][0].add(0)

for i in range(W+H-1):
  I,J=0,0
  if i < H:
    I=i
    J=0
  else:
    I=H-1
    J=i-H+1
  while I>=0 and J<W:
    sa = abs(A[I][J] - B[I][J])
    for point in dp[I][J]:
      if I!=H-1:
        dp[I+1][J].add(point+sa)
        dp[I+1][J].add(abs(point-sa))
      if J!=W-1:
        dp[I][J+1].add(point+sa)
        dp[I][J+1].add(abs(point-sa))
    I-=1
    J+=1

ans=dp[H-1][W-1]
sa = abs(A[H-1][W-1] - B[H-1][W-1])
res=float("inf")
for p in ans:
  res=min(res,abs(p+sa),abs(p-sa))
print(res)
import math
import psutil

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
A,B,C,D = input().split()
A = int(A)-1
s = lcm(int(C),int(D))
#s = int(C)*int(D)
#numac = int(A)//int(C)#10//6 = 1
#numad = int(A)//int(D)#10//8 = 1
#numacd = int(A)//s#10//24 = 0
numa = int(A)//int(C) + int(A)//int(D) - int(A)//s
#numa = 1
#numbc = int(B)//int(C)#40//6 = 6
#numbd = int(B)//int(D)#40//8 = 5
#numbcd = int(B)//s#40//24= 1
numb = int(B)//int(C) + int(B)//int(D) - int(B)//s
#numb = 1
print(int(B)-int(A)-(numb - numa))

### FIXED CODE ###

import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
A,B,C,D = input().split()
A = int(A)-1
s = lcm(int(C),int(D))
#s = int(C)*int(D)
#numac = int(A)//int(C)#10//6 = 1
#numad = int(A)//int(D)#10//8 = 1
#numacd = int(A)//s#10//24 = 0
numa = int(A)//int(C) + int(A)//int(D) - int(A)//s
#numa = 1
#numbc = int(B)//int(C)#40//6 = 6
#numbd = int(B)//int(D)#40//8 = 5
#numbcd = int(B)//s#40//24= 1
numb = int(B)//int(C) + int(B)//int(D) - int(B)//s
#numb = 1
print(int(B)-int(A)-(numb - numa))
n, m = map(int, input().split())
edge = [[0] * n for _ in range(n)]
for i in range(n):
   a, b = map(int, input().split())
   edge[a-1][b-1] = 1
   edge[b-1][a-1] = 1

# depth-first search
def dfs(now, visited):
   if (False not in visited):
      return(1)

   ans = 0
   for i in range(1, n+1):
      if (edge[now-1][i-1] == 1  and visited[i-1] == False):
         visited[i-1] = True
         # recursive
         ans += dfs(i, visited)
         visited[i-1] = False

   return(ans)

visited = [False] * n
visited[0] = True
print(dfs(1, visited))


### FIXED CODE ###

n, m = map(int, input().split())
g = [[] for i in range(n)]

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

def dfs(v):
   if (len(v) == n):
      return 1

   ans = 0
   for u in set(g[v[-1]]) - set(v):
      ans += dfs(v + [u])

   return ans

print(dfs([0]))
食べた回数= int(input())
値段=800
ボーナス=200
支払うお金= 食べた回数 * 値段
もらうお金=　食べた回数//15 * ボーナス

print(支払うお金 - もらうお金)

### FIXED CODE ###

n = int(input())

give = n * 800
take = n // 15 * 200

print(give - take)
n,a,b=input(),input(),input()
n=int(n)
a=int(a)
b=int(b)
k=n//(a+b)*a+min(a,n%(a+b))
  
print(k)

### FIXED CODE ###

s=input()
if s[0]==s[1] and s[0]==s[2]:
  print('No')
else:
  print('Yes')
N, K, Q = map(int, input().split())
A = np.array([int(input()) for _ in range(Q)])

ans = np.zeros(N)
ans += K

for a in A:
    ans[a-1] += 1

ans -= Q

for a in ans:
    if a>0:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

import numpy as np
N, K, Q = map(int, input().split())
A = np.array([int(input()) for _ in range(Q)])

ans = np.zeros(N)
ans += K

for a in A:
    ans[a-1] += 1

ans -= Q

for a in ans:
    if a>0:
        print("Yes")
    else:
        print("No")
x, y = map(int, input().split())

while (x != 0 && y != 0):
    if x <= y :
        print(x, y)
    else :
        print(y, x)

    x = int(input())
    y = int(input())

### FIXED CODE ###

while 1:
    x,y = map(int,input().split())
    if not x+y:break
    if x > y : x,y = y,x
    print(x,y)
x=input().split()
n=int(x[0])
a=int(x[1])
b=int(x[2])
v=input().split()
x=0
while x<n:
    v[x]=int(v[x])
    x+=1
v.sort()
ave=0
for i in range(a):
    ave+=v[-i-1]
print(ave/a)
up=1
down=1
ans=0
x=v[-a:].count(v[-a])
y=v.count(v[-a])
if v[-1]!=v[-a]:
    
    for i in range(1,y+1):
        up*=i
    for i in range(1,x):
        down*=i
    for i  in range(1, y-x+1):
        down*=i
    print(up//down)
else:
    ii=a
    while v[-ii]==v[-1] and ii<=b:
        up=1
        down=1
        for i in range(1,y+1):
            up*=i
        for i in range(1,ii+1):
            down*=i
        for i  in range(1, y-ii+1):
            down*=i
        ans+=(up//down)
        ii+=1
    print(ans)

### FIXED CODE ###

import decimal
def ncr(x,y):
	ans=1
	q=x-y
	while x>y:
		ans*=x
		x=x-1
	
	while q>1:
		ans=ans/q
		q=q-1
	
	return ans

x=input().split()
n=int(x[0])
a=int(x[1])
b=int(x[2])
v=[0]*n
x = input().split()
ind=0
M={1:0}
M2={1:0}
for i in x:
	v[ind]=int(i)
	if int(i) in M:
		M[v[ind]]+=1
	else:
		M[v[ind]]=1
	ind+=1
v.sort(reverse=True)

cnt=0
ind=0
m=0
while cnt<a:
	cnt+=1
	m=decimal.Decimal((cnt-1)*m+v[ind])/decimal.Decimal(cnt)
	if v[ind] in M2:
		M2[v[ind]]+=1
	else:
		M2[v[ind]]=1
	ind+=1
while cnt<b:
	if (cnt*m+v[ind])/(cnt+1)<m:
		break
	else:
		cnt+=1;
		if v[ind] in M2:
			M2[v[ind]]+=1
		else:
			M2[v[ind]]=1
		ind+=1
print(m)
maxw=cnt;
ways=0;
for i in range(int(cnt),a-1,-1):
	if v[ind-1] not in M2:
			M2[v[ind]]=0
	if v[ind-1] not in M:
			M[v[ind-1]]=0
	#print(M[v[ind-1]],M2[v[ind-1]])
	ways+=ncr(M[v[ind-1]],M2[v[ind-1]])
	
	M2[v[ind-1]]-=1

print(round(ways))
N=int(input())
x=[0]
y=[0]
t=[0]

flag=1
for i in range(1,N+1):
  t_tmp,x_tmp,y_tmp=map(int,input().split())
  t.append(t_tmp)
  x.append(x_tmp)
  y.append(y_tmp)
  time=abs(t[i-1]-t[i])
  d=abs(x[i-1]-x[i])+abs(y[i-1]-y[i])
  if d>time or (d%2)!=(time%2):
    print("No")
    flag=0
    break
    
if flag==1:
  print("Yes")

### FIXED CODE ###

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

N=a*b

if N%2==0:
  print("Even")
else:
  print("Odd")
n = int(input())
a = list(map(int,input().split()))
MOD = 10 ** 9 + 7
digit = 60
o=[0]*digit
z=[0]*digit

for i in a:
  for j in range(digit):
    if (i >> j) & 1:
      o[j] += 1
    else:
      z[j] += 1
ans = 0
for j in range(digit):
  ans += (o[j]*z[j]*2**j
print(ans % MOD)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
MOD = 10 ** 9 + 7
digit = 60
o=[0]*digit
z=[0]*digit

for i in a:
  for j in range(digit):
    if (i >> j) & 1:
      o[j] += 1
    else:
      z[j] += 1
ans = 0    
for j in range(digit):
  ans += (o[j]*z[j]*pow(2,j,MOD))
print(ans % MOD)
a,b,c = map(int, input().split())

if a=b=c:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

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

if a==b and b==c and a==c:
  print('Yes')
else:
  print('No')