Harryxun/stf_run huggingface dataset:
n = int(input())
d = dict()

for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

M = max(d.values())

ans_list = []
for k,v in d.items():
    if v == M:
        ans_list.append(k)

ans_list.sort()
for i in ans_list:
    print(i

### FIXED CODE ###

n = int(input())
d = dict()

for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

M = max(d.values())

ans_list = []
for k,v in d.items():
    if v == M:
        ans_list.append(k)

ans_list.sort()
for i in ans_list:
    print(i)
a,b,c = map(int,input(.split()))
print(a*b/2)


### FIXED CODE ###

a,b,c = map(int,input().split())
print(a*b//2)
import time
import random
N = int(input())
s = str(input())
maxlen = N//2
start = time.time()
def solve(tgt):
    for i in range(N-tgt*2+1):
        if s[i:i+tgt] in s[i+tgt:]:
            return True
    return False

ng = maxlen + 1
ok = 0
if N>650:
    ok = 2
first = 1
while ng-ok > 1:
    end = time.time()
    if end-start > 1.2:
        if ok <= 8:
            assert()
        r = random.random.randint(ok,ng-1)
        print(r)
        exit()
    tgt = (ok+ng)//2
    if first == 1:
        tgt = 8
        first = 0
    if solve(tgt):
        ok = tgt
    else:
        ng = tgt
print(ok)


### FIXED CODE ###

from collections import defaultdict as dd
N = int(input())
s = str(input())
maxlen = N//2

def solve(tgt):
    dic = dd(int)
    st = s[tgt:2*tgt]
    dic[st] += 1
    ls = [st]
    for char in s[2*tgt:]:
        st = st[1:]+char
        dic[st] += 1
        ls.append(st)
    st = s[:tgt]
    if dic[st] > 0:
        return True
    dic[ls[0]] -= 1
    for i,char in enumerate(s[tgt:N-tgt]):
        st = st[1:]+char
        if dic[st] > 0:
            return True
        dic[ls[i+1]] -= 1
    return False

ng = maxlen + 1
ok = 0
while ng-ok > 1:
    tgt = (ok+ng)//2
    if solve(tgt):
        ok = tgt
    else:
        ng = tgt
print(ok)
print(sum(range(1,int(input())))

### FIXED CODE ###

n = int(input())
print(n*(n-1)//2)
num, capacity = map(int, input().split())
dp = [0]*(capacity+1)

for i in range(1, num + 1):
    weight, value = map(int, input().split())
    for w in range(capacity,w-1,-1):
        if w < weight:
            continue
        else:
            dp[w] = max( dp[w - weight] + value,  dp[w] )
print(dp[num][capacity])

### FIXED CODE ###

def calc(num,capacity):
    dp = [0]*(capacity+1)
    for _ in range(num):
        weight, value = map(int, input().split())
        for w in range(capacity,weight - 1,-1):
            tmp = dp[w - weight] + value
            if dp[w] < tmp:
              dp[w] = tmp
    return dp[capacity]

num, capacity = map(int, input().split())
print(calc(num,capacity))
s = input()
if s[0] == '>':
  a = [0]
else:
  a = []
flg = 1
for i in range(1,len(s)):
  if s[i] != s[i-1]:
    a.append(flg)
    flg = 1
  else:
    flg += 1
if s[-1] != s[-2]:
  a.append(flg)
else:
  a.append(flg)
if s[-1] == '<':
  a.append(0)
ans = 0
for i in range(len(a)//2):
  if a[2*i] > a[2*i+1]:
    a[2*i+1] -= 1
    ans += a[2*i]*(a[2*i]+1)//2 + a[2*i+1]*(a[2*i+1]+1)//2
  else:
    a[2*i] -= 1
    ans += a[2*i]*(a[2*i]+1)//2 + a[2*i+1]*(a[2*i+1]+1)//2
print(ans)

### FIXED CODE ###

s = input()
if s[0] == '>':
  a = [0]
else:
  a = []
flg = 1
for i in range(1,len(s)):
  if s[i] != s[i-1]:
    a.append(flg)
    flg = 1
  else:
    flg += 1
a.append(flg)
if s[-1] == '<':
  a.append(0)
ans = 0
for i in range(len(a)//2):
  if a[2*i] > a[2*i+1]:
    a[2*i+1] -= 1
    ans += a[2*i]*(a[2*i]+1)//2 + a[2*i+1]*(a[2*i+1]+1)//2
  else:
    a[2*i] -= 1
    ans += a[2*i]*(a[2*i]+1)//2 + a[2*i+1]*(a[2*i+1]+1)//2
print(ans)
A, B = map(int, input().split())
print("GREATER" if A<B else "EQUAL" if A==B else "LESS")

### FIXED CODE ###

A = int(input())
B = int(input())
print("GREATER" if A>B else "EQUAL" if A==B else "LESS")
count = list(map(int, input().split()))[0]
y = list(map(int, input().split()))[1]
from math import floor

l_lim = floor(y / 10000)
m_lim = floor(y / 5000)
n_lim = floor(y / 1000)

flag = False
for l in range(l_lim + 1):
    for m in range(m_lim + 1):
        for n in range(n_lim + 1):
            if (l+m+n == count)&(10000 * l + 5000 * m + 1000 * n == y):
                print(l, m, n)
                flag = True
                break
        if flag:
            break
    if flag:
        break
if flag == False:
    print(-1, -1, -1)

### FIXED CODE ###

input_list = list(map(int, input().split()))
count = input_list[0]
y = input_list[1]
flag = False
for l in range(count + 1):
    for m in range(count - l + 1):
        n = count - l - m
        if 10000 * l + 5000 * m + 1000 * n == y:
            print(l, m, n)
            flag = True
            break
        if flag:
            break
    if flag:
        break
if flag == False:
    print(-1, -1, -1)
n=int(input())
a=[[]] * n
x=[[]] * n
y=[[]] * n
for i in range(n):
  a[i]=int(input())
  x[i]=[[]] * a[i]
  y[i]=[[]] * a[i]
  for j in range(a[i]):
    x[i][j],y[i][j]=map(int,input().split())
def eva(o,p,q):
  for i in range(a[p]):
    if x[p][i]-1==q:
      return(y[p][i])
  for i in range(a[p]):
    if x[p][i]-1==o:
      return(1)
  for i in range(a[p]):     
    if y[p][i]==1:     
      return(eva(o,x[p][i]-1,q))
  return(1)
def test(p,q):
  return(eva(p,p,q)*eva(q,q,p))

ans=[[[] for i in range(n) ] for j in range(n)]
for i in range(n):
  for j in range(n):
    ans[i][j]=test(i,j)

b=[sum(ans[i])for i in range(n)]

sum=0
for i in range(n):
  if max(b)==0:
    break
  c=b.index(max(b))
  for j in range(n):
    if ans[c][j]==0:
      b[j]=0
  b[c]=0
  sum+=1
print(sum)

### FIXED CODE ###

n=int(input())
a=[[]] * n
x=[[]] * n
y=[[]] * n
for i in range(n):
  a[i]=int(input())
  x[i]=[[]] * a[i]
  y[i]=[[]] * a[i]
  for j in range(a[i]):
    x[i][j],y[i][j]=map(int,input().split())

com=[[0 for i in range(n) ] for j in range(2**n)]

for i in range(2**n):
  for j in range(n):
    if ((i >> j) & 1) == 1:
      com[i][j]=1
  #正直者の証言が全て合っているか。
  for j in range(n):
    if com[i][j]==1:
      for k in range(a[j]):
        if y[j][k]!=com[i][x[j][k]-1]:
          com[i]=[0 for l in range(n) ]
          break
sum=[sum(com[i]) for i in range(2**n) ]
print(max(sum))
n=int(input())
s=input()

i=0
for ss in s:
  if ss=="#":
    break
  i+=1

s=s[i:]  
  
cnt=0
for i in range(1,n+1):  
  if s[-1*i]=="#":
    cnt+=1
  else:
    break

s=s[:-1*cnt]
#print(s)
  
print(min(s.count("."),s.count("#")))

  

### FIXED CODE ###

n=int(input())
s=input()
s=s

ll=0 #左側の黒い数を保持
rr=s.count(".") #右側の白い数を保持

result=ll+rr
for item in s:
    if item=="#":
        ll+=1
    else:
        rr-=1
    
    result=min(result,ll+rr)

print(result)
n,k = map(int,input().split())
s = input()
ls = list(s)
ls[k] = ls[k].lower()
print("".join(ls))

### FIXED CODE ###

n,k = map(int,input().split())
s = input()
ls = list(s)
ls[k-1] = ls[k-1].lower()
print("".join(ls))
N, K = map(int,input().split())
A = list(map(int,input().split()))
B = [0]
S = set([]);S.add(0)
now = 0
Flag = False
loop_start = -1
if K <= 2*pow(10,5)+10:
  for i in range(K):
    nxt = A[now]-1
    B.append(nxt)
    now = nxt
  #print(B)
  print(B[K]+1)
  exit()
for i in range(K*2):
  nxt = A[now]-1
  #print(now,nxt)
  if nxt in S:
    if Flag:
      if nxt == loop_start:
        #print(nxt,i)
        loop_cycle = i-loop_num
        break
    else:
      loop_start = nxt
      loop_num = i
      Flag = True
  else:
    B.append(nxt);S.add(nxt)
  now = nxt
#print(B,loop_start,loop_cycle,loop_num)
loc = (K-loop_start)%loop_cycle+loop_start
#print(loc)
print(B[loc]+1)

### FIXED CODE ###

N , K = map(int,input().split())
 
A = list(map(int,input().split()))
 
reach = [-1 for i in range(N)]
reach[0] = 0 #最初の町は0回でいく
now = 0
#loop = 1
dic ={}
dic[0] = 0
for i in range(N):
  to = A[now]-1
  if reach[to] != -1:
    ini = i+1
    #print(i,to,reach[to])
    loop = i+1 - reach[to]
    break
  if i+1 not in dic:
    dic[i+1] = to
  reach[to] = i+1
  #loop += 1
  now = to
 
 
#print(dic,reach,loop,ini)
if K < ini:
  print(dic[K]+1)
else:
  t = (ini-loop) + (K-ini)%loop
  print(dic[t]+1)
n=input()
n=n[-1]
print(n)
if n=='3':
    print('bon)
if n=="0" or n=="1" or n=="6" or n=="8":
    print('pon')
if n=="2" or n=="4" or n=="5" or n=="7" or n=="9":
    print('hon')
    

### FIXED CODE ###

n=input()
n=n[-1]
if n=='3':
    print('bon')
if n=="0" or n=="1" or n=="6" or n=="8":
    print('pon')
if n=="2" or n=="4" or n=="5" or n=="7" or n=="9":
    print('hon')
def solve(string):
    n, k, *v = map(int, string.split())
    lefts = [0] * (k + 1)
    rights = [0] * (k + 1)
    """
    for i in range(k + 1):
        for j in range(k - i + 1):
            base = sorted(v[:i] + v[max(n - k + i + j, i):])
            ans = max(ans, sum([b for l, b in enumerate(base) if b >= 0 or j <= l]))
    """
    for i in range(1, k + 1):
        _v = sorted(v[:i], reverse=True)
        lefts[i] = max(lefts[i], sum(_v))
        j = 0def solve(string):
    n, k, *v = map(int, string.split())
    """
    for i in range(k + 1):
        for j in range(k - i + 1):
            base = sorted(v[:i] + v[max(n - k + i + j, i):])
            ans = max(ans, sum([b for l, b in enumerate(base) if b >= 0 or j <= l]))
    """

    def s(w):
        l = [0] * (k + 1)
        for i in range(1, k + 1):
            _w = sorted(w[:i], reverse=True)
            tmp = sum(_w)
            l[i] = max(l[i], tmp)
            j = 0
            while i + j < k and len(_w) and _w[-1] < 0:
                j += 1
                tmp -= _w.pop()
                l[i + j] = max(l[i + j], tmp)
        return l

    lefts = s(v)
    rights = s(v[::-1])
    ans = max([lefts[i] + rights[k - i] for i in range(k + 1)])
    ans = min(ans, sum([_v for _v in v if _v > 0]))
    return str(ans)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))

        while i + j < k and len(_v) and _v[-1] < 0:
            j += 1
            _v.pop()
            lefts[i + j] = max(lefts[i + j], sum(_v))
    for i in range(1, k + 1):
        _v = sorted(v[-i:], reverse=True)
        rights[i] = max(rights[i], sum(_v))
        j = 0
        while i + j < k and len(_v) and _v[-1] < 0:
            j += 1
            _v.pop()
            rights[i+j] = max(rights[i+j], sum(_v))
    ans = max([lefts[i] + rights[k - i] for i in range(k + 1)])
    ans = min(ans, sum([_v for _v in v if _v > 0]))
    return str(ans)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))


### FIXED CODE ###

def solve(string):
    n, k, *v = map(int, string.split())
    ans = 0
    for i in range(k + 1):
        for j in range(k - i + 1):
            base = sorted(v[:i] + v[max(n - k + i + j, i):])
            ans = max(ans, sum([b for l, b in enumerate(base) if b >= 0 or j <= l]))
    return str(ans)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))
import sys
from itertools import combinations
from collections import Counter
read = sys.stdin.read

N, *xy = map(int, read().split())
pq = []
for (a1, b1), (a2, b2) in combinations(zip(*[iter(xy)] * 2), 2):
    p = a1 - a2
    q = b1 - b2
    pq.append((p, q))
    pq.append((-p, -q))

print(N - Counter(pq).most_common()[0][1])

### FIXED CODE ###

import sys
from itertools import combinations
from collections import Counter
read = sys.stdin.read

N, *xy = map(int, read().split())

if N == 1:
    print(1)
    exit()

pq = []
for (a1, b1), (a2, b2) in combinations(zip(*[iter(xy)] * 2), 2):
    p = a1 - a2
    q = b1 - b2
    pq.append((p, q))
    pq.append((-p, -q))

print(N - Counter(pq).most_common()[0][1])
n = int(input())
s = set()
s.append(n)
i = 1
while True:
  i += 1
  if n % 2 == 0:
    n = n / 2
  else:
    n = 3 * n + 1
  if n in s:
    print(i)
  s.add(n)

### FIXED CODE ###

n = int(input())
s = set()
s.add(n)
i = 1
while True:
  i += 1
  if n % 2 == 0:
    n = n / 2
  else:
    n = 3 * n + 1
  if n in s:
    print(i)
    break
  s.add(n)
D, T, S = map(int, input(),split)

if S*T >= D:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

D, T, S = map(int, input().split())

if S*T >= D:
  print("Yes")
else:
  print("No")
a = int(input())
b = int(input())
h = int(input())

print(int((a+b*h/2))
      

### FIXED CODE ###

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

S=(a+b)*h/2

print(int(S))
n, T = map(int, input().split())
a = 1001
for i in range(n):
  c, t = map(int, input().split())
  if t < T:
    a = min(a.c)
if a == 1001:
  print("TLE")
else:
  print(a)

### FIXED CODE ###

n, T = map(int, input().split())
a = 1001
for i in range(n):
    c, t = map(int, input().split())
    if t <= T:
        a = min(a,c)
if a == 1001:
    print("TLE")
else:
    print(a)
C11,C12,C13 = input().split()
C21,C22,C23 = input().split()
C31,C32,C33 = input().split()

print(C11 + C22 + C33)

### FIXED CODE ###

C1= input()
C2= input()
C3= input()

print(C1[0] + C2[1] + C3[2])
import time
s=time.time()
while time.time()-s<39.99:pass
i=input
a,b,c,d,e=map(int,[i(),i(),i(),i(),i()])
print(c*-a+d+b*e)if a<0 else print((b-a)*e)

### FIXED CODE ###

import time
s=time.time()
while time.time()-s<39.9:pass
i=input
a,b,c,d,e=map(int,[i(),i(),i(),i(),i()])
if a<0:print(c*-a+d+b*e)
else:print((b-a)*e)
import numpy as np
num_list = []

def leg_num(c, t):
    return 2*c+4*t


for i in range(1, 101):
    leg_num_list = []
    for j in range(i):
        if leg_num(j, i-j) <= 100:
            leg_num_list.append(leg_num(j, i-j))
        if leg_num(i-j, j) <= 100:
            leg_num_list.append(leg_num(i-j, j))
    num_list.append(leg_num_list)

x, y = map(int, input().split(" "))
if y in num_list[x]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

import numpy as np
num_list = []

def leg_num(c, t):
    return 2*c+4*t

for i in range(1, 101):
    leg_num_list = []
    for j in range(i):
        if leg_num(j, i-j) <= 100:
            leg_num_list.append(leg_num(j, i-j))
        if leg_num(i-j, j) <= 100:
            leg_num_list.append(leg_num(i-j, j))
    num_list.append(leg_num_list)

x, y = map(int, input().split(" "))
if y in num_list[x-1]:
    print("Yes")
else:
    print("No")
import sys
import  math
from heapq import *
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

    
N,M=nm()
INF=10**18
def bfs(start,edge):
    d=[INF]*(M+1)
    ans=[0]*(M+1)
    d[start]=0
    q=[(0,start)]
    while(len(q)!=0):
        ci,i=heappop(q)
        for j in edge[i]:
            if(d[j]>d[i]+1):
                d[j]=d[i]+1
                heappush(q,(d[j],j))
                ans[j]=i

    return ans




edge=[[]for _ in range(M+1)]
for i in range(M):
    A,B=nm()
    edge[A].append(B)
    edge[B].append(A)

ans=bfs(1,edge)

for i in range(2,M+1):
    if(ans[i]==0):
        print('No')
        sys.exit(0)

print('Yes')
for i in range(2,M+1):
    print(ans[i])




### FIXED CODE ###

import sys
import  math
from heapq import *
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

    
N,M=nm()
INF=10**18
def bfs(start,edge):
    d=[INF]*(N+1)
    ans=[0]*(N+1)
    d[start]=0
    q=[(0,start)]
    while(len(q)!=0):
        ci,i=heappop(q)
        for j in edge[i]:
            if(d[j]>d[i]+1):
                d[j]=d[i]+1
                heappush(q,(d[j],j))
                ans[j]=i

    return ans




edge=[[]for _ in range(N+1)]
for i in range(M):
    A,B=nm()
    edge[A].append(B)
    edge[B].append(A)

ans=bfs(1,edge)


for i in range(2,N+1):
    if(ans[i]==0):
        print('No')
        sys.exit(0)

print('Yes')
for i in range(2,N+1):
    print(ans[i])
x1, y1, x2, y2 = [int(s) for s in input().split(" ")]

x3 = x2 - (y2-y1)
y3 = y2 + (x2-x1)
x4 = x1 - (y2-y1)
y4 = y1 + (x2-x1)

print(f"{x3} {y3} {x4} {y4}")


### FIXED CODE ###

def joinWithSpace(list):
    return " ".join([str(s) for s in list])


x1, y1, x2, y2 = [int(s) for s in input().split(" ")]

x3 = x2 - (y2-y1)
y3 = y2 + (x2-x1)
x4 = x1 - (y2-y1)
y4 = y1 + (x2-x1)

print(joinWithSpace([x3, y3, x4, y4]))
S = list(input())

last = S.pop(0)
stack = [last]
cnt = 0
for s in S:
    if last != s:
        stack.pop()
        # stack.append(s) 読み捨て
        cnt += 2
    else:
        stack.append(s)
        last = s

print(cnt)

### FIXED CODE ###

S = list(input())

last = S.pop(0)
stack = [last]
can_pop = True
cnt = 0
for s in S:
    if last != s and can_pop:
        stack.pop()
        if len(stack) == 0:
            can_pop = False
        # stack.append(s) 読み捨て
        cnt += 2
    else:
        stack.append(s)
        last = s
        can_pop = True

print(cnt)
str = input()

for s in str:
  a[s] = int(str[s])
print(sum(a))


### FIXED CODE ###

str = input()

a = int(str[0])
b = int(str[1])
c = int(str[2])

print(a+b+c)
last = input()
if input[1] == "B":
  print("ARC")
else:
  print("ABC")

### FIXED CODE ###

S = input()
if S[1] == "B":
  print("ARC")
else:
  print("ABC")
l = map(int, input().split())
if l[0] == l[1] + l[2] or l[1] == l[0] + l[2] or l[2] == l[0] + l[1]:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

l = map(int,raw_input().split())
if l[0] == l[1] + l[2] or l[1] == l[0] + l[2] or l[2] == l[0] + l[1]:
  print('Yes')
else:
  print('No')
import numpy as np
N = int(input())

A = np.array([int(i) for i in input().split()])
A_sort = np.sort(A)

#print(A_sort)
score = 0
score += A_sort[-1]
for i in range(0, (N-2)//2):
    score += A_sort[-2-i] * 2
    
if (N-2) % 2 == 1:
    score += A_sort[-3-i]
    
print(score)


### FIXED CODE ###

N = int(input())

print((1000 - (N % 1000)) % 1000)
def f(a):
	r = []
	for d in range(1,int(a ** 0.5) + 1):
		r.append(d)
        if d * d != a:
	        r.append(a/d)
	return r
a,b,k = map(int, raw_input().split(' '))
r = []
for d in f(a):
	if d in f(b):
      	r.append(d)
print r[-k]

   


### FIXED CODE ###

def f(a):
	r = []
	for d in range(1,int(a ** 0.5) + 1):
		if a % d == 0:
			r.append(d)	
			if d * d != a: r.append(a/d)
	return r if r else [1]
a,b,k = map(int, raw_input().split(' '))
r = []
for d in f(a):
	if d in f(b):
		r.append(d)

r.sort()

print r[-k]
import math


def run(t, a, b, c, d):
    ret = []
    for i in range(t):
        ret.append(check(a[i], b[i], c[i], d[i]))
    return ret


def check(a, b, c, d):
    if a < b:
        return 'No'
    if d < b:
        return 'No'
    if c < b:
        g = math.gcd(b, d)
        if g == 1:
            if b - 1 > c:
                return 'No'
        else:
            if (b - g) > c:
                return 'No'
    return 'Yes'


def read_line():
    t = int(input())
    a = []
    b = []
    c = []
    d = []
    for i in range(t):
        at, bt, ct, dt = list(map(int, input().split()))
        a.append(at)
        b.append(bt)
        c.append(ct)
        d.append(dt)
    return (t, a, b, c, d)


def main():
    t, a, b, c, d = read_line()
    ret = run(t, a, b, c, d)
    for i in range(t):
        print(ret[i])


if __name__ == '__main__':
    main()


### FIXED CODE ###

import fractions


def run(t, a, b, c, d):
    ret = []
    for i in range(t):
        ret.append(check(a[i], b[i], c[i], d[i]))
    return ret


def check(a, b, c, d):
    if a < b:
        return 'No'
    if d < b:
        return 'No'
    if c < b:
        g = fractions.gcd(b, d)
        amodb = a % b
        if g == 1:
            if b - 1 > c:
                return 'No'
        elif g == b:
            if amodb > c:
                return 'No'
        else:
            if (b - g) > c:
                return 'No'
    return 'Yes'


def read_line():
    t = int(input())
    a = []
    b = []
    c = []
    d = []
    for i in range(t):
        at, bt, ct, dt = list(map(int, input().split()))
        a.append(at)
        b.append(bt)
        c.append(ct)
        d.append(dt)
    return (t, a, b, c, d)


def main():
    t, a, b, c, d = read_line()
    ret = run(t, a, b, c, d)
    for i in range(t):
        print(ret[i])


if __name__ == '__main__':
    main()
import math
r = int(raw_input())
V = r*r*math.pi
S = 2*r*math.pi

print '%f %f' %(V, S)

### FIXED CODE ###

import math
r = float(raw_input())
V = r*r*math.pi
S = 2*r*math.pi

print '%f %f' %(V, S)
N,W=map(int,input().split())
oj=[]
for i in range(N):
  oj.append(list(map(int,input().split())))
M=100*1001
dp=[10**10]*M
dp[0]=0
for i in range(N):
  for j in range(M,-1,-1):
    if j+oj[i][1]<M:
      k=j+oj[i][1]
      dp[k]=min(dp[k,dp[j]+oj[i][0])
v=0
for i in range(M):
  if dp[i]<=W:v=i
print(v)


### FIXED CODE ###

N,W = map(int, input().strip().split(" "))
oj = []
for i in range(N):
    tmp = list(map(int, input().strip().split(" ")))
    oj.append(tmp)

#dp = [0] * (W+1)
M = 100 * 1001
dp = [10**10] * M

dp[oj[0][1]] = oj[0][0]

for i in range(1,N):
    for j in range(M, -1, -1):
        if j + oj[i][1] < M:
            dp[j + oj[i][1]] = min(dp[j + oj[i][1]], dp[j] + oj[i][0])
    dp[oj[i][1]] = min(dp[oj[i][1]], oj[i][0])

v = 0
for i in range(M):
    if dp[i] <= W:
        v = i
print(v)
N, X = map(int, input().split())

a = [1]
p = [1]
for i in range(1, N+1):
    a.append(2 * a[i-1] + 3)
    p.append(2 * a[i-1] + 1)

def calc(N, X): #レベルNバーガーの下からX層に含まれるパティの枚数
    if N == 0: #全てパティ
        if X == 0:
            return 0
        else:
            return 1
    if X == 1:
        return 0
    # print (N - 1)
    if 1 <= X <= a[N - 1]:
        # print ('A')
        return calc(N - 1, X - 1)
    if X == 2 + a[N - 1]:
        # print ('B')
        return p[N - 1] + 1
    if 2 +a[N - 1] < X <= 2 + 2 * a[N - 1]:
        # print ('C')
        return p[N - 1] + 1 + calc(N - 1, X - 2 - a[N - 1])
    if X == 3 + 2 * 2 * a[N - 1]:
        # print ('D')
        return 2 * p[N - 1] + 1

print (calc(N, X))

### FIXED CODE ###

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

a = [1]
p = [1]
for i in range(1, N+2):
    a.append(2 * a[i-1] + 3)
    p.append(2 * p[i-1] + 1)

def calc(N, X): #レベルNバーガーの下からX層に含まれるパティの枚数
    if N == 0: #全てパティ
        if X == 0:
            return 0
        else:
            return 1
    if X == 1:
        return 0
    # print (N - 1)
    if 1 < X <= 1 + a[N - 1]:
        # print ('A')
        return calc(N - 1, X - 1)
    if X == 2 + a[N - 1]:
        # print ('B')
        return p[N - 1] + 1
    if 2 + a[N - 1] < X <= 2 + 2 * a[N - 1]:
        # print ('C')
        return p[N - 1] + 1 + calc(N - 1, max(X - 2 - a[N - 1], 0))
    if X == 3 + 2 * a[N - 1]:
        # print ('D')
        return p[N]

print (calc(N, X))
a, op, b = list(input().split())
if op == '+':
  ans = a + b
else:
  ans = a - b
print(ans)


### FIXED CODE ###

a, op, b = list(input().split())
a, b = int(a), int(b)
if op == '+':
  ans = a + b
else:
  ans = a - b
print(ans)
import collections
N = int(input())
l = list(input())
c = collections.Counter(l)
m = 1
for k, v in c.items():
    m *= (v + 1)
print(m - 1)
import collections
N = int(input())
l = list(input())
c = collections.Counter(l)
m = 1
for k, v in c.items():
    m *= (v + 1)
m = m - 1
m = m % (10^9 + 7)
import collections
N = int(input())
l = list(input())
c = collections.Counter(l)
m = 1
for k, v in c.items():
    m *= (v + 1)
print(m - 1)
import collections
N = int(input())
l = list(input())
c = collections.Counter(l)
m = 1
for k, v in c.items():
    m *= (v + 1)
m = m - 1
m = m % (10^9 + 7)
print(m)

### FIXED CODE ###

from sys import stdin
N=int(input())
S=list(input().strip())
ans=1
for i in set(S):
    ans=ans*(S.count(i)+1)
ans-=1
print(ans%(10**9+7))
N, X = map(int, input().split())
L = list(map(int, input().split()))

pos = 0
iter = 0

while pos <= X and len(L) >= iter:
    iter += 1
    pos += L[iter-1]
    

print(iter)


### FIXED CODE ###

import numpy as np

N, X = map(int, input().split())
L = np.array([0] + list(map(int, input().split()))) 

res = sum([1 if e <= X else 0 for e in np.cumsum(L)])

print(res)
N = int(input())
h_ = list(input().split())
h = [int(i) for i in h_]
cnt=[0]*(N-1)
for i in range(N-1):
  for j in range(i,N-1):
    if h[j] >= h[j+1]:
      cnt[i]+=1
    else:
      break
print(max(cnt))

### FIXED CODE ###

N = int(input())
H = [int(x) for x in input().split()]
dp = [0] * len(H) 
for i in range(1, len(H)):
  if H[i-1] >= H[i]: 
    dp[i] = dp[i-1] + 1
ans = max(dp)
print(ans)