Harryxun/stf_run huggingface dataset:
n=int(input())
l=list(map(int,input().split()))
count=0
for i in range (n-2):
    for j in range (i+1,n-1):
        if l[i]==l[j]:
            continue
        l[i]+l[j]
        for k in range (j+1,n):
            if l[k]==l[i] or l[k]==l[l]:
                continue
            if l[k]<l[i]+l[j] and l[i]<l[j]+l[k] and l[j]<l[k]+l[i] :
                count+=1
print(count)
    


### FIXED CODE ###

m=input()
s=list(m)
a=[]
n=len(s)
j=0
while (j<n):
    x=0
    if s[j] == 'R':
        y=j+1
        for k in range (j,n):
            y=k+1
            if s[k]=='S':
                y=k+1
                break
            else:
                x+=1
        a.append(x)
        j=y

    else:
        j+=1

a.sort(reverse=True)
if len(a)==0:
    print (0)
else:
    print(a[0])
def qsort(seq, left, right):
    #[再帰の終了条件は？]
    if left == right: return seq
    elif left+1 == right:
        if seq[left]>seq[right]:
          seq[left],seq[right] = seq[right], seq[left]
        return seq

    med = (left+right)//2
    pivot = seq[med] #[与えられた範囲の真ん中に位置する要素]
    #カーソルを⽤意
    cur_l = left
    cur_r = right
    
    #このwhile文で並べ替え終わらせる
    while True:
        #[左カーソル（cur_l）をpivotより⼤きい要素まで進める]
        while seq[cur_l] <= pivot:
          if cur_l >= cur_r:
            break
          cur_l += 1
        
        #[右カーソル（cur_r）をpivotより⼩さい要素まで進める]
        while seq[cur_r] > pivot:
            if cur_r <= cur_l:
              break
            cur_r -= 1
        # カーソル交差でループ終了
        if (cur_r <= cur_l): 
          break
        # cur_l < cur_rだが，左側にpivotより⼤きい要素，右側にpivotより⼩さい要素がそれぞれ⾒つかった．
        #[cur_rの要素とcur_lの要素を⼊れ替える]
        seq [cur_l], seq[cur_r] = seq[cur_r], seq[cur_l]
        cur_l += 1
        cur_r -= 1
    #print(seq)
    cut = -1
    if cur_l == cur_r:
        #print('pp')
        if seq[cur_l] < pivot:
            #print('qq')
            cut = cur_l
        else:
            #print('rr')
            cut = cur_l-1
    elif cur_l == cur_r+1:
        #print('ss')
        cut = cur_r
    #print(cut)

    # このwhileループを抜けるということは，左右の要素の⼊れ替えが完了したこと．
    # 分割したグループそれぞれに対して，qsortを実⾏したい！ -> 再帰
    #[左側だけでqsort]
    qsort(seq,left,cut)
    #[右側だけでqsort]
    qsort(seq,cut+1,right)
    # どんな引数を与えれば良い？
    return 0

N = int(input())
vec = list(map(int,input().split()))
qsort(vec,0,N-1)
ans = vec[0]
for i in range(N-1):
  ans = (ans + vec[i+1])/2
print(ans)




### FIXED CODE ###

def quick_sort(seq, left, right):
  if left >= right - 1 and seq[left] <= seq[right]:
    return 0
  mid = (left + right)//2
  pivot = seq[mid]
  L = left
  R = right
  while True:
    if seq[L] >= pivot and seq[R] <= pivot:
      seq[L], seq[R] = seq[R], seq[L]
      L += 1
      R -= 1
    elif seq[L] >= pivot:
      R -= 1
    elif seq[R] <= pivot:
      L += 1
    else:
      L += 1
      R -= 1
    if L >= R:
      break
  '''if L == R:
    if seq[L] >= mid:
      R -= 1'''
  quick_sort(seq,left,R)
  quick_sort(seq,L,right)
  return seq

N = int(input())
vec = list(map(int,input().split()))
quick_sort(vec,0,N-1)
ans = vec[0]
for i in range(N-1):
  ans = (ans + vec[i+1])/2
print(ans)
# -*- coding: utf-8 -*-
"""
Created on Wed Jun  5 09:53:48 2019

@author: Enya
"""

input_code = input()

A = int(input_code[0])*3 + int(input_code[2])
N = 0

if A>3:
    N = A//3

else:
    N = 0
    
print(N)
    

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Wed Jun  5 09:53:48 2019

@author: Enya
"""

input_code = input()
A = int(input_code.split()[0])
P = int(input_code.split()[1])

X = A*3 + P

print(X//2)
N = input()
a = []
for i in range(N):
    a.append(input())
b = list(set(a))
If length(b) ==3 :
  print(3)
elso :
  print(4)

### FIXED CODE ###

N = int(input())
Num_of_Group = int(N/3)
print(Num_of_Group)
import numpy as np

l, n = [int(i) for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = ll.index(min(abs(ll)))
lll = ll.pop(mini)

print(sum(lll))


### FIXED CODE ###

import numpy as np

n, l = [int(i) for i in input().split(" ")]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = np.where(np.absolute(ll) == np.min(np.absolute(ll)))
ll = list(ll)
del ll[mini[0][0]]

print(np.sum(ll))
a,b=map(int, raw_input.split( ))
c=max(a+b,a-b,a*b)
print c

### FIXED CODE ###

a=list(map(int,input( ).split( )))
b=a[0]+a[1]
c=a[0]-a[1]
d=a[0]*a[1]
e=max(b,c,d)
print (e)
l = map(int, input().split())

a=l[0] # A
b=l[1] # B
c=l[2] # C

A=b-a
B=c-b

if A==B:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

l = list(map(int, input().split()))
 
a=l[0]
b=l[1]
c=l[2]
 
A=b-a
B=c-b
 
if A==B:
    print('YES')
else:
    print('NO')
a, b, c, x, y = map(int, input().split())
big = max(a, b)
small = min(a, b)
small_many = False
if (small == a and y <= x) or (small == b and x <= y):
    small_many = True
if big <= c:
    print(x * a + y * b)
elif small <= c < big:
    if ((big + small) <= 2 * c):
        print(x * a + y * b)
    else:
        if small_many:
            print(2 * c * min(x, y) + small * (max(x, y) - (min(x, y))))
        else:
            print(2 * c * max(x, y))
else:
    if small_many:
        print(2 * c * min(x, y) + small * (max(x, y) - (min(x, y))))
    else:
        print(min(2 * c * max(x, y)))


### FIXED CODE ###

INF = 10 ** 9
a, b, c, x, y = map(int, input().split())

ans = INF
for i in range(10 ** 5 + 1):
    ans = min(ans, i * 2 * c + max((x - i), 0) * a + max((y - i), 0) * b)
print(ans)
# coding: utf-8
from math import gcd

def getPrime(x):
    num_list=[i for i in range(2,x+1)]
    prime_list=[]
    D=[x+1 for i in range(x+1)]
    
    while num_list[0]<x**(1/2):
        p=num_list.pop(0)
        prime_list.append(p)
        for i in range(len(num_list)):
            if num_list[i]%p==0:
                if D[num_list[i]]>p:
                    D[num_list[i]]=p
        num_list = [e for e in num_list if e % p != 0]
    
    prime_list = prime_list + num_list
    for i in range(len(prime_list)):
        D[prime_list[i]] = prime_list[i]
    D[0]=1
    D[1]=1
    return D

N = int(input())
A = list(map(int,input().split()))
D = getPrime(max(A))

pc_flg = True

x = A[0]
for i in range(N):
    x = gcd(x,A[i])

prime_flg=[False for i in range(10**6+1)]

for i in range(N):
    num = A[i]
    primes = []
    while True:
        p = D[num]
        num = num//p
        primes.append(p)
        if num == 1:
            break
        for j in set(primes):
            if not(prime_flg[j]):
                prime_flg[j] = True
            else:
                pc_flg = False

if pc_flg:
    print("pairwise coprime")
elif x==1:
    print("setwise coprime")
else:
    print("not coprime")

### FIXED CODE ###

# coding: utf-8
from math import gcd

def getPrime(x):
    num_list=[i for i in range(2,x+1)]
    prime_list=[]
    D=[x+1 for i in range(x+1)]
    
    while num_list[0]<x**(1/2):
        p=num_list.pop(0)
        prime_list.append(p)
        for i in range(len(num_list)):
            if num_list[i]%p==0:
                if D[num_list[i]]>p:
                    D[num_list[i]]=p
        num_list = [e for e in num_list if e % p != 0]
    
    prime_list = prime_list + num_list
    for i in range(len(prime_list)):
        D[prime_list[i]] = prime_list[i]
    D[0]=1
    D[1]=1
    return D

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

if max(A) == 1:
    print("pairwise coprime")
    exit()

D = getPrime(max(A))

pc_flg = True

x = A[0]
for i in range(N):
    x = gcd(x,A[i])

prime_flg=[False for i in range(10**6+1)]

for i in range(N):
    num = A[i]
    primes = []
    while True:
        p = D[num]
        num = num//p
        primes.append(p)
        if num == 1:
            break
    for j in set(primes):
        if not(prime_flg[j]):
            prime_flg[j] = True
        else:
            if j != 1:
                pc_flg = False


if pc_flg:
    print("pairwise coprime")
elif x==1:
    print("setwise coprime")
else:
    print("not coprime")
f = map(int, input().split())
f = sorted(f)
if f==[5, 5, 7]:


### FIXED CODE ###

f = map(int, input().split())
f = sorted(f)
if f==[5, 5, 7]:
  print('YES')
else:
  print('NO')
def main():
  name = input()
  print(name)
	
  
  
  
if __name__ == '__main__'
	main()

### FIXED CODE ###

name = input('')
print(name[:3])
N = int(input())
A = list(int(i) for i in input().split())
A.insert(0, 0)
A.append(0)
Q = 0
j=0

for i in range(N):
    while j < N + 1:
        if j == i:
            Q += abs(A[j] - A[j+2])
            j += 1
        else:
            Q += abs(A[j] - A[j+1])
        j += 1
    print("%d" % (Q))
    Q = 0
    j = 0

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
D = int(input())

if A > B:
    if C > D:
        print("%d" % (B+D))
    else:
        print("%d" % (B+C))
else:
    if C > D:
        print("%d" % (A+D))
    else:
        print("%d" % (A+C))
n, k = (int(x) for x in input().split())
P = list(int(x) - 1 for x in input().split())
C = list(int(x) for x in input().split())

ans = -1e18
for si in range(n):
    S = [C[si]]
    x = P[si]
    while x != si:
        S.append(S[-1] + C[x])
        x = P[x]
    m = len(S)
    if k <= m:
        tmp = max(S[:k])
    else:
        loop = k // m
        r = k % m
        tmp = max(S[-1] * loop + max(S[:r]), S[-1] * (loop - 1) + max(S), max(S))
    ans = max(ans, tmp)
print(ans)

### FIXED CODE ###

n, k = (int(x) for x in input().split())
P = list(int(x) - 1 for x in input().split())
C = list(int(x) for x in input().split())

ans = -1e18
for si in range(n):
    S = [C[si]]
    x = P[si]
    while x != si:
        S.append(S[-1] + C[x])
        x = P[x]
    m = len(S)
    if k <= m:
        tmp = max(S[:k])
    else:
        loop = k // m
        r = k % m
        tmp = max(S[-1] * (loop - 1) + max(S), max(S))
        if r != 0:
            tmp = max(tmp, S[-1] * loop + max(S[:r]))
    ans = max(ans, tmp)
print(ans)
L, N = map(int, input().split())
s = [input() for i in range(N)]
print("".join(sorted(s)))


### FIXED CODE ###

N,L = map(int, input().split())
s = [input() for i in range(N)]
s.sort()
print(''.join(s))
N = int(input())
A = list(map(int, input().split()))

A = sorted(A)

count_m = 0
count_z = 0
count_p = 0
sum_abs = 0

for i in range(N):
    if A[i] < 0:
        count_m += 1
        sum_abs -= A[i]
    elif A[i] == 0:
        count_z += 1
    else:
        count_p += 1
        sum_abs += A[i]

if count_m + count_z == 0:
    print(sum_abs-2*min(A))
    tmp = A[0]
    for i in range(N-2):
        print(tmp, A[i+1])
        tmp -= A[i+1]
    print(A[-1], tmp)

elif count_p + count_z == 0:
    print(sum_abs+2*max(A))
    tmp = A[-1]
    for i in range(N-1):
        print(tmp, A[i])
        tmp -= A[i]

elif count_p + count_m == 0:
    print(0)
    for i in range(N-1):
        print(0, 0)

elif count_p == 0:
    print(A[2*N])
    print(sum_abs)
    cmz = count_m + count_z
    tmp = A[-1]
    for i in range(cmz - 1):
        print(tmp, A[i])
        tmp -= A[i]
    tmp_2 = A[cmz-1]
    for i in range(count_p-1):
        print(tmp_2, A[i+cmz])
        tmp_2 -= A[i+cmz]
    print(tmp, tmp_2)

else:
    print(sum_abs)
    cmz = count_m + count_z
    tmp = A[-1]
    for i in range(cmz - 1):
        print(tmp, A[i])
        tmp -= A[i]
    tmp_2 = A[cmz-1]
    for i in range(count_p-1):
        print(tmp_2, A[i+cmz])
        tmp_2 -= A[i+cmz]
    print(tmp, tmp_2)

### FIXED CODE ###

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

A = sorted(A)

count_m = 0
count_z = 0
count_p = 0
sum_abs = 0

for i in range(N):
    if A[i] < 0:
        count_m += 1
        sum_abs -= A[i]
    elif A[i] == 0:
        count_z += 1
    else:
        count_p += 1
        sum_abs += A[i]

if count_m + count_z == 0:
    print(sum_abs-2*min(A))
    tmp = A[0]
    for i in range(N-2):
        print(tmp, A[i+1])
        tmp -= A[i+1]
    print(A[-1], tmp)

elif count_p + count_z == 0:
    print(sum_abs+2*max(A))
    tmp = A[-1]
    for i in range(N-1):
        print(tmp, A[i])
        tmp -= A[i]

elif count_p + count_m == 0:
    print(0)
    for i in range(N-1):
        print(0, 0)

else:
    print(sum_abs)
    cmz = count_m + count_z
    tmp = A[-1]
    for i in range(cmz - 1):
        print(tmp, A[i])
        tmp -= A[i]
    tmp_2 = A[cmz-1]
    if count_p != 0:
        for i in range(count_p-1):
            print(tmp_2, A[i+cmz])
            tmp_2 -= A[i+cmz]
        print(tmp, tmp_2)
n,k,q = map(int, list(input().split()))
a = [int(input()) for i in range(q)]

point=[k]*n
for i in range(q):
	point[a[i]]+=1
for i in range(n):
    if point[i]==max(point):
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

n,k,q = map(int, list(input().split()))
point=[k]*n
a=[]
	
for i in range(q):
	a.append(int(input()))
	point[a[i]-1]+=1
for i in range(n):
    if point[i]-q>0:
        print("Yes")
    else:
        print("No")
# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = np.array(lr())
A -= np.arange(1, N+1)
A.sort()

def check(i):
    ret = np.abs(A - A[i]).sum()
    return ret

answer = min(check(0), check(-1))
left = 0; right = N-1
while abs(right-left) > 2:
    l_mid = (left*2 + right) // 3
    r_mid = (left + right*2) // 3
    if check(l_mid) < check(r_mid):
        right = r_mid
    else:
        left = l_mid

cand = min(check(l_mid), check(r_mid))
answer = min(answer, cand)
print(answer)


### FIXED CODE ###

import numpy as np
import statistics

N = int(input())
A = np.array(list(map(int, input().split())))
R = np.array([x+1 for x in range(N)])

med = int(np.median((A-R)))
print(abs(A-R-med).sum())
A,B,C=list(map(int,input()))
if A==B:
    print(C)
elif B==C:
    print(A)
else:
    print(B)

### FIXED CODE ###

A,B,C=list(map(int,input().split()))
if A==B:
    print(C)
elif B==C:
    print(A)
else:
    print(B)
N = int(input())
s = [''.join(sorted(input())) for _ in range(N)]
 
from collections import Counter
counter = Counter(s)
ans = sum(n*(n-1)//2 for n in counter.values())
print(ans)

### FIXED CODE ###

a,b=map(int,input().split())
X = int(a + b)
Y = int(a - b)
Z = int(a * b)
ans = [X,Y,Z]
print(max(ans))
W, H, x, y, r = map(int, input().split())
if r <= x <= W - r and r <= y <= H - r
  print("Yes")
else:
  print("No")

### FIXED CODE ###

W, H, x, y, r = map(int, input().split())
if r <= x <= W - r and r <= y <= H - r:
  print("Yes")
else:
  print("No")
def gcd(x,y):
    if y == 0:
        return x
    else:
        return gcd(y,x%y)

n = int(input())
t = [int(input()) for i in range(n)]

if n == 1:
    ans = t[0]
else:
    lcd = t[0]*t[1]/gcd(t[0],t[1])
    for i in range(2,n):
        lcd = lcd*t[i]/gcd(lcd,t[i])
    ans = lcd
    
print(ans)

### FIXED CODE ###

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

n = int(input())
t = [int(input()) for i in range(n)]

if n == 1:
    ans = t[0]
else:
    lcd = t[0]*t[1]//gcd(t[0],t[1])
    for i in range(2,n):
        lcd = lcd*t[i]//gcd(lcd,t[i])
    ans = lcd

print(ans)
import math
r = int(input())
print(r**2*math.pi, 2*r*math.pi)

### FIXED CODE ###

import math
r = float(input())
print(r**2*math.pi, r*2*math.pi)
N = int(input())
H = [int(n) for n in input().split()]
m = H[N-1]
for i in range(0, N-1)[::-1]:
    if H[i] > m+1:
        return 'No'
    else:
        m = H[i]
return 'Yes'


### FIXED CODE ###

N = int(input())
H = [int(n) for n in input().split()]
m = H[N-1]
ans = 'Yes'
for i in range(0, N-1)[::-1]:
    if H[i] > m+1:
        ans = 'No'
        break
    elif H[i] == m+1:
        m = H[i]-1
    else:
        m = H[i]
print(ans)
N,Q= map(int, input().split())
d = {}
counter = [0]*N
for i in range(N-1):
    key, value = input().split()
    if key in d.keys():
        d[key] += value
    else:
        d[key] = value

def fun_dict(key):
    temp = len(d[key])
    for i in range(temp):
        if d[key][i] in d.keys():
            d[key] += d[d[key][i]]
            fun_dict(d[key][i])
fun_dict('1')

for i in range(Q):
    p, x = map(int, input().split())
    counter[p-1] += x
    if str(p) in d.keys():
        for values in d[str(p)]:
            counter[int(values) - 1] += x
print(' '.join(map(str, counter)))

### FIXED CODE ###

from collections import deque
N,Q= map(int, input().split())
tree = [[] for _ in range(N)]
counter = [0]*N
visited = [False]*N
q = deque([0])

for i in range(N-1):
    a,b = map(int, input().split())
    tree[a-1].append(b-1)
    tree[b-1].append(a-1)

for i in range(Q):
    p,x = map(int, input().split())
    counter[p-1] += x

while q:
    parent = q.popleft()
    visited[parent] = True
    for child in tree[parent]:
        if visited[child]:
            continue
        counter[child] += counter[parent]
        q.append(child)
print(*counter)
def main():
    import sys
    input = sys.stdin.buffer.readline
    N, Q = map(int, input().split())
    *C, = map(int, input().split())

    last = [-1]*(N+1)
    P = []
    for i, c in enumerate(C):
        if last[c] != -1:
            P.append((last[c], i+1))
        last[c] = i+1

    queries = []
    for i in range(Q):
        l, r = map(int, input().split())
        queries.append((l, r, i))

    P.sort()
    queries.sort(reverse=True)

    class BIT():
        def __init__(self, n, x=1):
            self.n = n
            self.T = [0]*(n+1)

        def add(self, i, x):
            while i <= self.n:
                self.T[i] += x
                i += i & -i

        def sum(self, i):
            ret = 0
            while i:
                ret += self.T[i]
                i -= i & -i
            return ret

    bit = BIT(N)
    ans = [0]*Q
    for l, r, i in queries:
        while P and P[-1][0] >= l:
            cl, cr = P.pop()
            bit.add(cr, 1)
        ans[i] = r-l+1-bit.sum(r)

    print('\n'.join(map(str, ans)))


if __name__ == '__main__':
    main()


### FIXED CODE ###

N = int(input())

if N >= 30:
    print('Yes')
else:
    print('No')
print(min(B//A), C)

### FIXED CODE ###

a, b, c = [int(i) for i in input().split(" ")]
print(min(b//a, c))
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0110
"""
# runtime error
import sys
import re

def solve(exp):
    p1 = re.compile('^0+')
    for i in range(10):
        modified_exp = exp.replace('X', str(i))
        left, right = modified_exp.split('=')
        left1, left2 = left.split('+')

        if len(left1) > 1:
            left1 = p1.sub('', left1)
        if len(left2) > 1:
            left2 = p1.sub('', left2)
        if len(right) > 1:
            right = p1.sub('', right)

        if int(left1)+int(left2)==int(right):
            return i
    return 'NA'


def main(args):
    for line in sys.stdin:
        result = solve(line.strip())
        print(result)


if __name__ == '__main__':
    main(sys.argv[1:])

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0110
"""
# runtime error
import sys
import re

def solve(exp):
    p1 = re.compile('^0+')
    for i in range(10):
        modified_exp = exp.replace('X', str(i))
        left, right = modified_exp.split('=')
        left1, left2 = left.split('+')

        left1 = p1.sub('', left1)
        if left1 == '':
            left1 = '0'
        left2 = p1.sub('', left2)
        if left2 == '':
            left2 = '0'
        right = p1.sub('', right)
        if right == '':
            right = '0'

        # print('{} + {} <=> {}'.format(left1, left2, right))
        if int(left1) + int(left2) == int(right):
            return i
    return 'NA'



def solve2(exp):
    for i in range(10):
        left, right = exp.split('=')
        left1, left2 = left.split('+')

        left1 = left1.replace('X', str(i))
        left2 = left2.replace('X', str(i))
        right = right.replace('X', str(i))
        if len(left1) > 1 and left1[0] == '0':
            continue
        if len(left2) > 1 and left2[0] == '0':
            continue
        if len(right) > 1 and right[0] == '0':
            continue
        if int(left1, base=10) + int(left2, base=10) == int(right, base=10):
            return i
    return 'NA'




def main(args):
    for line in sys.stdin:
        #result = solve(line.strip())
        #print(result)
        result = solve2(line.strip())
        print(result)


if __name__ == '__main__':
    main(sys.argv[1:])
s = input()


def unbalanced(st):
    for c in st:
        if st.count(c) > len(st) // 2:
            return True
    return False


def test_str(st):
    r = (-1, -1)
    if len(s) < 3:
        return r
    if len(s) == 3:
        if unbalanced(s):
            return (1, 3)
        else:
            return r
    for i in range(len(s) - 3):
        if unbalanced(s[i:i+3]):
            r = (i+1, i+3)
            return r


print(test_str(s)[0], test_str(s)[1])

### FIXED CODE ###

s = input()


def unbalanced(st):
    for c in st:
        if st.count(c) > (len(st) // 2):
            return True
    return False


def test_str(st):
    r = (-1, -1)
    for j in range(1, 3):
        for i in range(len(s) - j):
            if unbalanced(s[i:i+j+1]):
                r = (i+1, i+j+1)
                return r
    return r


print(test_str(s)[0], test_str(s)[1])
h,w=map(int, input().split())
for i in range(h):
  t=input().split().index('snuke')
  if t<0:
    continue
  print('%s%d' % (chr(t+ord('A')), i+1))
  quit(0)

### FIXED CODE ###

h,w=map(int, input().split())
for i in range(h):
  l = input().split()
  if 'snuke' in l:
    t=l.index('snuke')
    print('%s%d' % (chr(t+ord('A')), i+1))
    quit(0)
import numpy
row1 = input()
row2 = input()
if row1[0] == row2[2] and row1[1] == row2[1] and row1[2] == row2[0]:
  print('YES')
print('NO)

### FIXED CODE ###

row1 = input()
row2 = input()
if row1[0] == row2[2] and row1[1] == row2[1] and row1[2] == row2[0]:
  print('YES')
else:
  print('NO')
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

MOD = 1_000_000_000 + 7
N = int(readline())
C = np.array(read().split(), np.int64)

C.sort()

ans = (C * np.arange(N+1, 1, -1) % MOD).sum() % MOD
ans *= pow(2, N+N-2, MOD)

print(ans % MOD)

### FIXED CODE ###

import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

MOD = 1000000000 + 7
N = int(readline())
C = np.array(read().split(), np.int64)

C.sort()

ans = (C * np.arange(N+1, 1, -1) % MOD).sum() % MOD
ans *= pow(2, N+N-2, MOD)

print(ans % MOD)
import math
a,b,k = list(map(int,input().split()))
c = math.gcd(a,b)
d = list()
for i in range(1,(c//2)+1):
    if c%i == 0:
        d.append(i)
d.append(c)
print(d[-k])

### FIXED CODE ###

a,b,k = list(map(int,input().split()))
c= 1
d=0
if b < a:
    a,b=b,a
while True:
    d = b%a
    if d == 0:
        c=a
        break
    else:
        b = a
        a = d
e = 0
for i in range(1,c+1):
    if c%i == 0:
        e +=1
        if e == k:
            print(int(c/i))
            break
# -*- coding: utf-8 -*-
# problem B

a = int(input())
b = int(input())

def comp(a, b):
    if a < b:
        print("LESS")
    elif a < b:
        print("GREATER")
    else:
        print("EQUAL")

comp(a, b)

### FIXED CODE ###

# -*- coding: utf-8 -*-
# problem A

s = input().split(' ')

print(s[0][0].upper() + s[1][0].upper() + s[2][0].upper())
import numpy as np

n, m, c = [int(x) for x in input().split(' ')]
b = np.asarray([int(x) for x in input().split(' ')])

a = np.ndarray((n, 3), dtype=np.int32)
for i in range(n):
    a[i] = [int(x) for x in input().split(' ')]


s = np.sum(a * b, axis=1)
print(np.sum(s + c > 0))


### FIXED CODE ###

n, m, c = [int(x) for x in input().split(' ')]
b = [int(x) for x in input().split(' ')]

count = 0
for i in range(n):
    a = [int(x) for x in input().split(' ')]
    ab = sum(x * y for (x, y) in zip(a, b))
    if ab + c > 0:
        count += 1
        
print(count)
a,b,c = map(int,inpout().split())
print(min(b//a,c))


### FIXED CODE ###

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