Harryxun/stf_run huggingface dataset:
def insertionSort(*args):
    l = list(args)
    for i in range(1, n):
        v = l[i]
        j = i - 1
        while j >= 0 and l[j] > v:
            l[j + 1] = l[j]
            j -= 1
            l[j + 1] = v
            print ' '.join(map(str, l))

n = input()
l = [input() for i in range(n)]
insertionSort(*l)

### FIXED CODE ###

def insertionSort(*args):
    l = list(args)
    print ' '.join(map(str, l))
    for i in range(1, n):
        v = l[i]
        j = i - 1
        while j >= 0 and l[j] > v:
            l[j + 1] = l[j]
            j -= 1
            l[j + 1] = v
        print ' '.join(map(str, l))

n = input()
l = map(int, raw_input().split())
insertionSort(*l)
a,b = map(int,input().split())

c = b - a 

def count(n):
  if n ==1:
    return 1
  else:
    return count(n-1)+n

print(count(c)-b)

### FIXED CODE ###

import sys
sys.setrecursionlimit(2000)

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

c = b - a 

def count(n):
  if n ==1:
    return 1
  else:
    return count(n-1)+n

print(count(c)-b)
import numpy as np
import sys


def DP(i, X, w, v):
    global memo
    if (X < 0):
        return -10 ** 9
    if (memo[i, X] != -10 ** 9):
        return memo[i, X]
    result = max(DP(i + 1, X, w, v),
                 DP(i + 1, X - w[i], w, v) + v[i])
    memo[i, X] = result
    return result


def main():
    input = sys.stdin.readline
    N, W = map(int, input().split())
    w = [0] * N
    v = [0] * N
    for i in range(N):
        w[i], v[i] = map(int, input().split())
    MINUS_INF = -10 ** 9
    memo = np.full((N + 1, W + 1), MINUS_INF, dtype=np.int64)
    memo[N, :] = 0
    answer = DP(0, W, w, v)
    print(answer)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import numpy as np
import sys


def main():
    input = sys.stdin.readline
    n, W = map(int, input().split())
    w, v = [0] * n, [0] * n
    for i in range(n):
        w[i], v[i] = map(int, input().split())
    ndp = np.zeros(W + 1, dtype=np.int64)
    for w, v in zip(w, v):
        np.maximum(ndp[:-w] + v, ndp[w:], out=ndp[w:])
    print(ndp[-1])


if __name__ == "__main__":
    main()
N = int(input())
A = list(map(int, input().split()))
c=0
while(True):
    b=0
    for i in A:
        if i%2==0:
            b=b+1
        if b==N:
            for j in range(N):
                A[j]=A[j]/2
            c=c+1
    if b!=N:
        break
print(c)




### FIXED CODE ###

S = list(input())
print(S.count("1"))
a = int(input())
b = int(input())
c = a * b
if c / 2 == c // 2:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

a = input().split()
b = int(a[1])
a = int(a[0])
if (a * b) % 2:
  print("Odd")
else:
  print("Even")
N = int(input())
S={}
for _ in range(N):
  s = ''.join(sorted(input().rstrip()))
  if s in S:
    S[s] += 1
  else:
    S[s] = 1

ans=0
for s in S.values():
  ans += s*(s-1)//2
  
print(ans)

### FIXED CODE ###

A, B = [int(i) for i in input().split()]
print(max(A+B, A-B, A*B))
import heapq
N,M=map(int,input().split())
A=[-int(x) for x in input().split()]
heapq.heapify(A)
    
for i in range(0,M):
    tmp=heapq.heappop(A)
    heapq.heappush(A,-int(-tmp/2))
print(-sum(A))

### FIXED CODE ###

S=input()

if(S=="Sunny"):
    print("Cloudy")
elif(S=="Cloudy"):
    print("Rainy")
elif(S=="Rainy"):
    print("Sunny")
n, m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(n)]

d = [
        [
            [
                [
                    [None] * 2 for _ in range(2)
                ] for _ in range(2)
            ] for _ in range(m+1)
        ] for _ in range(n)
    ]

def rec(i, j, p):
    if i >= n or j <= 0:
        return 0

    if d[i][j][p[0]][p[1]][p[2]]:
        return d[i][j][p[0]][p[1]][p[2]]

    res1 = rec(i+1, j, p)
    res2 = rec(i+1, j-1, p)
    res2 += a[i][0] * (-1 if p[0] else 1)
    res2 += a[i][1] * (-1 if p[1] else 1)
    res2 += a[i][2] * (-1 if p[2] else 1)

    res = max(res1, res2)
    d[i][j][p[0]][p[1]][p[2]] = res
    return res

res = 0
for p0 in range(2):
    for p1 in range(2):
        for p2 in range(2):
            t = rec(0, m, [p0, p1, p2])
            if t > res:
                res = t
print(res)


### FIXED CODE ###

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

r = [[0]*n for _ in range(8)]
for i in range(n):
    x, y, z = map(int, input().split())
    r[0][i] = x+y+z
    r[1][i] = x+y-z
    r[2][i] = x-y+z
    r[3][i] = x-y-z
    r[4][i] = -x+y+z
    r[5][i] = -x+y-z
    r[6][i] = -x-y+z
    r[7][i] = -x-y-z

print(max(sum(sorted(r[i])[-m:]) for i in range(8)) if m != 0 else 0)
w = input()
flg = True
for i in list("abcdefghijklmnopqrstuvwxyz"):
    if w.count(w[i]) % 2 != 0:
        flg = False

if flg:
    print('Yes')
else:
    print('No')
    


### FIXED CODE ###

w = input()
flg = True
for i in list("abcdefghijklmnopqrstuvwxyz"):
    if w.count(i) % 2 != 0:
        flg = False

if flg:
    print('Yes')
else:
    print('No')
# Python Program to find LCM of n elements 

def find_lcm(num1, num2): 
	if(num1>num2): 
		num = num1 
		den = num2 
	else: 
		num = num2 
		den = num1 
	rem = num % den 
	while(rem != 0): 
		num = den 
		den = rem 
		rem = num % den 
	gcd = den 
	lcm = int(int(num1 * num2)/int(gcd)) 
	return lcm 
n=int(input())
l=[int(input()) for i in range(n)]

num1 = l[0] 
num2 = l[1] 
lcm = find_lcm(num1, num2) 

for i in range(2, len(l)): 
	lcm = find_lcm(lcm, l[i]) 
	
print(lcm) 

# Code contributed by Mohit Gupta_OMG 


### FIXED CODE ###

def gcd(a,b):
    if b==0: 
        return a 
    return gcd(b,a%b)
n=int(input())
l=[int(input()) for i in range(n)]
ans=l[0]
for i in range(1,n):
    ans=(ans*l[i])//gcd(ans,l[i])
print(ans)
import numpy as np


def div(n, d):
    cnt = 0
    while n % d == 0 and cnt < 18:
        n //= d
        cnt += 1
    return cnt


n = int(input())
arr = np.array([float(input()) for _ in range(n)], np.float64)
arr = np.rint(arr * 10**9).astype(np.int64)

f = np.vectorize(div)
arr2 = (f(arr, 2) + np.zeros([arr.shape[0],
                              arr.shape[0]], np.int64)).astype(np.int32)
arr5 = (f(arr, 5) + np.zeros([arr.shape[0],
                              arr.shape[0]], np.int64)).astype(np.int32)

arr2 = np.tril(arr2 + arr2.T)
arr2 -= arr2.T
arr5 = np.tril(arr5 + arr5.T)
arr5 -= arr5.T

result = (arr2 >= 18).astype(np.int32) + (arr5 >= 18).astype(np.int32)

print(np.sum(result >= 2))

### FIXED CODE ###

def div(n, d):
    cnt = 0
    while n % d == 0 and cnt < 18:
        n //= d
        cnt += 1
    return cnt


n = int(input())
dp = [[0]*19 for _ in range(19)]

ans = 0
for _ in range(n):
    x = round(float(input()) * pow(10, 9))
    two = div(x, 2)
    five = div(x, 5)
    ans += dp[18 - two][18 - five]
    for i in range(two + 1):
        for j in range(five + 1):
            dp[i][j] += 1

print(ans)
a = input()
a[3]='8'
print(a)

### FIXED CODE ###

s = input()
s = s.replace('2017','2018')
print(s)
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
Flag = [1]*N
for i in range(N):
  if Flag[i] ==1:
    for j in range(i+1,N):
      if Flag[j] ==1:
        if New_List[i] == New_List[j]:
          Flag[i] = 0
          Flag[j] = 0
        elif New_List[j] % New_List[i] ==0:
          Flag[j] = 0
        else:
          pass
      elif Flag[j] ==0:
        pass
  else:
    pass
res = Flag.count(1)
print(res)
N = int(input())
List = list(map(int, input().split()))
res = 0
New_List = sorted(List)
Flag = [1]*N
for i in range(N):
  if Flag[i] ==1:
    for j in range(i+1,N):
      if Flag[j] ==1:
        if New_List[i] == New_List[j]:
          Flag[i] = 0
          Flag[j] = 0
        elif New_List[j] % New_List[i] ==0:
          Flag[j] = 0
        else:
          pass
      elif Flag[j] ==0:
        pass
  else:
    pass
res = Flag.count(1)
print(res)


### FIXED CODE ###

N = int(input())
List = list(map(int, input().split()))
res = 0
List.sort()
K = List[N-1]+1
Flag = [1]*K
for i in range(N):
  if Flag[List[i]] ==1:
    res +=1
    for j in range(List[i],K,List[i]):
      Flag[j] = 0
    if i != N-1 and List[i] == List[i+1]:
      res += -1
print(res)
a, b = map(int, raw_input().split())
print '{1} {2} {3}'.format(a/b, a%b, float(a)/b)

### FIXED CODE ###

a, b = map(int, raw_input().split())
print '%d %d %f'%(a/b, a%b, float(a)/b)
n=int(input())
a=list(map(int,input().split()))
q=int(input())
for i in range(q):
  b,c=map(int,input().split())
  
  for j in range(n):
    if a[j]==b:
      a[j]=c
  print(sum(a))

### FIXED CODE ###

n=int(input())
b=""

while n>0:
  n-=1
  b+=chr(ord("a")+n%26)
  n=n//26
  
print(b[::-1])
n,r=map(int(input()))
if n<10:
    r+=100*(10-n)
print(r)

### FIXED CODE ###

n,r=map(int,input().split())
if n<10:
    r+=100*(10-n)
print(r)
import math
L = []
N,X = map(int,input().split())
L = list(map(int,input().split()))
L.append(X)
L = sorted(L)
D = []
for i in range(len(L)) :
    d = abs(L[i-1] - L[i])
    if i != 0 :
        D.append(d)

D = sorted(D)
if N != 1 :
    answer = math.gcd(D[0],D[1])
    for j in range(len(D)-1) :
        gcd = math.gcd(D[j],D[j+1])
        if answer > gcd :
            answer = gcd
else :
    answer = D[0]
print(answer)



### FIXED CODE ###

N, X = map(int, input().split())
A = list(map(int, input().split()))
diff = [abs(a - X) for a in A]

# 最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


while len(diff) > 1:
    a, b = diff.pop(), diff.pop()
    diff.append(gcd(a, b))

print(diff[0])
#!/usr/bin/env python
# coding: utf-8

# In[10]:


N,K = int(input()), int(input())
new = abs(N%K)
while(new<N):
    N = new
    new = abs(new%K)
print(N)



### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[10]:


N,K = map(int,input().split())
new = N % K
n2 = K - new

print(min(new,n2))
import sys
from sympy import *

for s in sys.stdin:
    a,b,c,d,e,f = map(int, s.split())
    x, y = symbols('x y')
    init_printing()
    solve([a*x + b*y - c],[d*x + e*y - f])

### FIXED CODE ###

import sys
 
lines = sys.stdin.readlines()
for line in lines:
    a, b, c, d, e, f = map(float, line.split())
    if a * e - b * d == 0:
        break
    x = (e * c + (-b) * f)/(a * e - b * d)
    y = ((-d) * c + a * f)/(a * e - b * d)
    print('{:.3f} {:.3f}'.format(x+0, y+0))
#coding:UTF-8
def LS(n,S,q,T):
    count=0
    if n>q:
        for i in q:
            if T[i] in S:
                count+=1
    else:
        for i in n:
            if S[i] in T:
                count+=1
    print(count)
  
if __name__=="__main__":
    n=int(input())
    S=input().split(" ")
    q=int(input())
    T=input().split(" ")
    LS(n,S,q,T)

### FIXED CODE ###

#coding:UTF-8
def LS(n,S,q,T):
    count=0
    if n>q:
        for i in range(q):
            if T[i] in S:
                count+=1
    else:
        for i in range(n):
            if S[i] in T:
                count+=1
    print(count)
  
if __name__=="__main__":
    n=int(input())
    S=input().split(" ")
    q=int(input())
    T=input().split(" ")
    LS(n,S,q,T)
k =int(input())
a, b = map(int, input().split())

for i in range(a, b):
    if(i % k == 0):
        break
    
if(i % k == 0):
    print("OK")
else:
    print("NG")

### FIXED CODE ###

k =int(input())
a, b = map(int, input().split())
 
for i in range(a, b+1):
    if (i % k == 0):
        print("OK")
        break
else:
    print("NG")
n= int(input())
a=list(map(int,input().split()))
a=np.array(a)
ans=1
for i in range(n):
    ans=ans*a[i]
if ans<=(10**18):
    print(ans)
else:
    print(-1)

### FIXED CODE ###

n= int(input())
a=list(map(int,input().split()))
a.sort()
ans=1
for i in a:
    ans=ans*i
    if ans>(10**18):
        print(-1)
        break
    elif ans==0:
        print(ans)
        break
if ans<=(10**18)and ans!=0:
    print(ans)
from collections import Counter
n = int(input())
ss = [sorted(input()) for i in range(n)]
cnt = 0
counter = Counter(ss)
for k, v in counter.items():
  cnt += 1
print(cnt)

### FIXED CODE ###

from collections import Counter
n=int(input())
string_list=["".join(sorted(list(input()))) for i in range(n)]
counter=Counter(string_list)
cnt=0
for k, v in counter.items():
  cnt+=int(v*(v-1)/2)
print(cnt)
[a,b,c]=[int(inp) for inp in input().split()]
#if a*a+b*b+c*c -2*(a*b+b*c+c*a) > 0:
if a*(a-2*b)+b*(b-2*c)>-c*(c-2*a):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

K=int(input())
array=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(array[K-1])
N = input()
if N % 3 == "3":
    print('bon')
elif N % 3 == "0" or "1" or "6" or "8":
    print('pon')
else:
    print('hon')

### FIXED CODE ###

n = input()
if n[-1] in '24579':
    print('hon')
elif n[-1] in '0168':
    print('pon')
else:
    print('bon')
from collections import defaultdict
from operator import sub

def main():
    N = int(input())
    balls = [tuple(map(int,input().split())) for _ in range(N)]
    d = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            d[tuple(map(sub, balls[i], balls[j]))] += 1
    try:
        mmax = N - max(d.values())
    except ValueError:
        print(100)
	print(mmax)

if __name__ == '__main__':
    main()

### FIXED CODE ###

from collections import defaultdict
from operator import sub

def main():
    N = int(input())
    balls = [tuple(map(int,input().split())) for _ in range(N)]
    d = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            d[tuple(map(sub, balls[i], balls[j]))] += 1
    try:
        mmax = N - max(d.values(), default=0)
        print(mmax)
    except ValueError:
        print(100)

if __name__ == '__main__':
    main()
# coding: utf-8
# Your code here!
# ITP1_4_B

import math

r=int(input())

print(r*r*math.pi)
print(r*2*math.pi)


### FIXED CODE ###

# coding: utf-8
# Your code here!
# ITP1_4_B

import math

r=float(input())
print(r*r*math.pi,r*2*math.pi)
n,m = map(int, input().split())
if n==m:
    print "Yes"
else:
    print "No"

### FIXED CODE ###

n,m = map(int, input().split())
if n==m:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())

data = {}
ps = [0] * N
ACs = []

num_ac = 0
num_wa = 0


for i in range(M):
    p, S = input().split()
    p = int(p)

    if ps[p] == 0:
        ps[p] = 1
        data[p] = {'AC':0, 'WA':0}

    if S == 'AC' and data[p]['AC'] == 0:
        ACs.append(p)
        data[p]['AC'] += 1
        num_ac += 1
        num_wa += data[p]['WA']

    if S == 'WA' and data[p]['AC'] == 0:
        data[p][S] += 1

print(num_ac, num_wa)




### FIXED CODE ###


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

data = {}
ps = [0] * N
ACs = []

num_ac = 0
num_wa = 0


for i in range(M):
    p, S = input().split()
    p = int(p) - 1

    if ps[p] == 0:
        ps[p] = 1
        data[p] = {'AC':0, 'WA':0}

    if S == 'AC' and data[p]['AC'] == 0:
        ACs.append(p)
        data[p]['AC'] += 1
        num_ac += 1
        num_wa += data[p]['WA']

    if S == 'WA' and data[p]['AC'] == 0:
        data[p][S] += 1

print(num_ac, num_wa)
h,w=map(int,input().split())
red=[list(map(int,input().split()))+[0] for i in range(h)]+[0 for i in range(w+1)]
blue=[list(map(int,input().split()))+[0] for i in range(h)]+[0 for i in range(w+1)]
field=[[[0 for h in range(6500)] for i in range(w+1)] for j in range(h+1)]
field[0][0][abs(red[0]-blue[0])]=1
for i in range(h):
    for j in range(w):
        for f in range(6401):
            if field[i][j][f]==1:
                field[i][j+1][f+abs(red[i][j+1]-blue[i][j+1])]=1
                field[i][j+1][abs(f-abs(red[i][j+1]-blue[i][j+1]))]=1
                field[i+1][j][f+abs(red[i+1][j]-blue[i+1][j])]=1
                field[i+1][j][abs(f-abs(red[i+1][j]-blue[i+1][j]))]=1
for i in range(6500):
    if field[h][w][i]==1:print(i);exit()


### FIXED CODE ###

import sys
input=sys.stdin.readline
h,w=map(int,input().split())
red=[list(map(int,input().split()))+[0] for i in range(h)]+[[0 for i in range(w+1)]]
blue=[list(map(int,input().split()))+[0] for i in range(h)]+[[0 for i in range(w+1)]]
field=[[[0 for h in range(6500)] for i in range(w+1)] for j in range(h+1)]
field[0][0][abs(red[0][0]-blue[0][0])]=1
for i in range(h):
    for j in range(w):
        for f in range(6401):
            if field[i][j][f]==1:
                field[i][j+1][f+abs(red[i][j+1]-blue[i][j+1])]=1
                field[i][j+1][abs(f-abs(red[i][j+1]-blue[i][j+1]))]=1
                field[i+1][j][f+abs(red[i+1][j]-blue[i+1][j])]=1
                field[i+1][j][abs(f-abs(red[i+1][j]-blue[i+1][j]))]=1
for i in range(6500):
    if field[h-1][w-1][i]==1:print(i);exit()
while True:
	a=sorted(map(int,input().split()))
	if a==0:
		break
	print(*a)


### FIXED CODE ###

while True:
	x,y=sorted(map(int,input().split()))
	if x==0 and y==0:
		break
	print(x, y)
N = int(input())
A = list(map(int, input().split()))
cau = 0
flag = "0"
while flag == "0":
    for i in range(N):
        if(A[i] % 2 != 1):
            flag = "1"
            break
        if(flag = "0"):
            for i in range(N):
                A[i] = A[i]/2
        cau += 1
print(cau)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
cau = 0
flag = True
while flag:
    for i in range(N):
        if A[i] % 2 == 1:
            flag = False
            break        
    if flag:
        for i in range(N):
            A[i] = A[i]/2
        cau += 1
print(cau)
n = int(input())
a= list(map(int,input().split()))
c = 1
if 0 in a:
    print(0)
else:
    for x in a:
        if x >10**18:
            print(-1)
            break
        else:
            z = x*c
            c = z
            if z >10**18:
                print(-1)
                break
print(z)

### FIXED CODE ###

n = int(input())
a= list(map(int,input().split()))
c = 1
if 0 in a:
    print(0)
else:
    for x in a:
        if x >10**18:
            print(-1)
            break
        else:
            z = x*c
            c = z
            if z >10**18:
                print(-1)
                break
    else:
        print(z)
# coding: utf-8
# Your code here!

import math 

n,k = map(int,input().split())

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
    
for i in range(1,k+1):
    #　青はボールk-i,仕切りi-1
    a = combinations_count(k-1, i-1) % (10**9 + 7)
    # 赤ノボールはn-k-(i-1).仕切りi
    b = combinations_count(n-k-(i-1)+i, i) % (10**9 + 7)
    print(a*b%(10**9 + 7))

### FIXED CODE ###

# coding: utf-8
# Your code here!


from scipy.misc import comb
mod = 10**9 + 7

n,k = map(int,input().split())

for i in range(1,k+1):
    a = int(comb(k-1, i-1, exact=True)) % mod
    b = int(comb(n-k+1, i, exact=True)) % mod 
    print(a*b%mod)
# -*- coding: <encoding name> -*-

s = input()
s_former = s[:(n - 1) / 2 + 1]
s_latter = s[(n + 3) / 2 + 1:]
print('Yes' if s == s[::-1] and s_former == s_former[::-1] and s_latter == s_latter[::-1] else 'No')


### FIXED CODE ###

S = input()
N = len(S)
S1 = S[0:(N-1)//2]
S2 = S[(N+3)//2-1:N+1]
print("Yes" if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else "No")
N,K=list(map(int,input().split()))
ans=N
A=set()
while ans>0:
    A.add(ans)
    ans=ans-K
    A.add(ans)
print(min([abs(i) for i in A]))

### FIXED CODE ###

N,K=list(map(int,input().split()))
print(min(N%K,K-N%K))
import sys
readline = sys.stdin.readline
import networkx as nx
from networkx.algorithms import bipartite

def main():
    N = int(readline())
    R = [tuple(map(int, readline().rstrip().split())) for _ in range(N)]
    B = [tuple(map(int, readline().rstrip().split())) for _ in range(N)]

    g = nx.Graph()  # 空の無向グラフを作成
    g.add_nodes_from([i for i in range(N)], bipartite=0)
    g.add_nodes_from([N + i for i in range(N)], bipartite=1)
    edge = []
    for i, (a, b) in enumerate(R):
        for j, (c, d) in enumerate(B):
            if a < c and b < d:
                g.add_edge(i, N+j, weight=1)

    d = nx.max_weight_matching(g)
    for (i, j) in g.edges():
        if ((i, j) not in d) and ((j, i) not in d):
            g.remove_edge(i, j)

    print(len(g.edges()))

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
readline = sys.stdin.readline
from operator import itemgetter

def main():
    N = int(readline())
    R = [tuple(map(int, readline().rstrip().split())) for _ in range(N)]
    B = [tuple(map(int, readline().rstrip().split())) for _ in range(N)]

    B.sort(key=itemgetter(0))
    R.sort(key=itemgetter(1), reverse=True)
    ans = 0
    for c, d in B:
        for a, b in R:
            if a < c and b < d:
                ans += 1
                R.remove((a, b))
                break
    
    print(ans)

if __name__ == '__main__':
    main()
# 入力の取得(1行目。数値)
i = list(map(int, input().split()))

# 変数セット
boundCnt = i[0]
limit = i[1]

# 入力の取得(2行目。数値)
landpoints = list(map(int, input().split()))

nowCnt = 0
nowLandpoints = 0
for i in range(boundCnt + 1):
    if nowLandpoints > limit:
        break
    nowCnt += 1
    nowLandpoints += landpoints[i]

print(nowCnt)


### FIXED CODE ###

# 入力の取得(1行目。数値)
i = list(map(int, input().split()))

# 変数セット
boundCnt = i[0]
limit = i[1]

# 入力の取得(2行目。数値)
landpoints = list(map(int, input().split()))
#1回目のバウンド情報を加算(0座標)
landpoints.insert(0,0)
boundCnt += 1

nowCnt = 0
nowLandpoints = 0

for i in range(boundCnt):

   nowLandpoints += landpoints[i]
   if nowLandpoints > limit:
      break

   nowCnt += 1

print(nowCnt )
A,B = map(int,input().split())
GCD(p,q):
    if p<q:
        p,q = q,p
    p = q
    q = p%q
    if q!=0:
        GCD(p,q)
    else:
        return p
gcd = GCD(A,B)
ans = (A*B)//gcd
print(ans)

### FIXED CODE ###

A,B = map(int,input().split())
def GCD(p,q):
    if p<q:
        p,q = q,p
    r = p
    p = q
    q = r%q
    if q!=0:
        return GCD(p,q)
    else:
        return p
gcd = GCD(A,B)
ans = (A*B)//gcd
print(ans)
from collections import defaultdict
from collections import deque
import sys
sys.setrecursionlimit(10**6)

n, q = map(int, input().split())

graph = defaultdict(deque)

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

arr = [0] * (n + 1)

for i in range(q):
    p, x = map(int, input().split())
    arr[p] += x


visited = [False] * (n + 1)


def dfs(curr):
    stack = graph[curr]

    while stack:
        leaf = stack.pop()
        if visited[leaf]:
            continue
        arr[leaf] += arr[curr]
        visited[leaf] = True
        dfs(leaf)


print(*ans[1:])

### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(10**6)

n, q = map(int, input().split())

graph = defaultdict(set)

for i in range(n - 1):
    a, b = map(int, input().split())
    graph[a].add(b)
    graph[b].add(a)

arr = [0] * (n + 1)

for i in range(q):
    p, x = map(int, input().split())
    arr[p] += x


def solve():
    stack = [1]
    visited = [True] * 2 + [False] * (n - 1)

    while stack:
        curr = stack.pop()
        for leaf in graph[curr]:
            if visited[leaf]:
                continue
            stack.append(leaf)
            visited[leaf] = True
            arr[leaf] += arr[curr]

    return arr


arr = solve()

print(*arr[1:])
#Cbit全探索
n, m, x = map(int, input().split())
books = [list(map(int, input().split())) for i in range(n)]
ans = [0]*(m+1); ans[0] = 10**7  
for i in range(2**n):
    state = [0]*(m+1)
    for j in range(n):
        if (i >> j) & 1:
             for k in range(m+1):
                state[k] += books[m-1-j][k]
    for j in range(1,m+1):
        if state[j] < x:
            break
    else:
        if ans[0] >= state[0]:
            ans = state
if ans[0] == 10**7:
	print(-1)
else:
  print(ans[0])

### FIXED CODE ###

n, m, x = map(int, input().split())
l = [list(map(int, input().split())) for i in range(n)]
bi_list = [bin(i)[2:] for i in range(2**n)] 
comb = [0] * (m+1)
comb[0] = 10**7
for i in bi_list:#本の選択パターン選択
    dig = len(i) 
    state = [0] * (m+1)
    for j in range(dig):#iから本の選択
        if i[dig-1-j] == '1':
            for k in range(m+1):#本の数値入力
                state[k] += l[n-1-j][k]
    for p in range(m):
        if state[m - p] < x:
            break
    else:
        if state[0] < comb[0]:
            comb = state
if comb[m] == 0:
    print(-1)
else:
    print(comb[0])
a, b, c=map(int,input().split())
if a<b && b<c:
 print("yes")
else:
 print("no")

### FIXED CODE ###

a, b, c=map(int,input().split())
if a<b:
 if b<c:
  print("Yes")
 else:
  print("No")
else:
 print("No")