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

ais = list(map(int, input().split(' ')))

count,cur,i = 0,0, 0

res = [cur]

while(i < len(ais)):

	cur += ais[i]

	res.append(cur)

	i +=1



print(len([e for e in res if e <= x]))
n,x = list(map(int, input().split(' ')))

ais = list(map(int, input().split(' ')))

count,cur,i = 1,0, 0

res = []

while(i < len(ais)):

	cur += ais[i]

	if cur <= x:

		count+=1

	else:

		break



	i +=1

print(count)

#print len([e for e in res if e <= x])
n, x = list(map(int, input().split(" ")))
ais = list(map(int, input().split(" ")))
count, cur, i = 0, 0, 0
res = [cur]
while i < len(ais):
    cur += ais[i]
    res.append(cur)
    i += 1
print(len([e for e in res if e <= x]))

n, x = list(map(int, input().split(" ")))
ais = list(map(int, input().split(" ")))
count, cur, i = 1, 0, 0
res = []
while i < len(ais):
    cur += ais[i]
    if cur <= x:
        count += 1
    else:
        break
    i += 1
print(count)
# print len([e for e in res if e <= x])

-count, cur, i = 0, 0, 0 -res = [cur] +count, cur, i = 1, 0, 0 +res = [] -    res.append(cur) +    if cur <= x: +        count += 1 +    else: +        break -print(len([e for e in res if e <= x])) +print(count) +# print len([e for e in res if e <= x])