Harryxun/stf_run huggingface dataset:
N = int(input())
A = [int(i) for i in input().split()]
res = []
for i in range(1, N-1):
    snk = sum(A[:i])
    arg = sum(A[i:])
    res.append(abs(snk-arg))
print(min(res))

### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]
A_sum = sum(A)
deltas = [A_sum]
res = []
for i in range(N-1):
    deltas.append(deltas[-1] - 2*A[i])
    res.append(abs(deltas[-1]))
print(min(res))
K, X = map(int, input().split())
result = K*500
if result >= X:
    print("yes")
elif result < X:
    print("no")

### FIXED CODE ###

K, X = map(int, input().split())
result = K*500
if result >= X:
    print("Yes")
else:
    print("No")
a=list(map(a,input().split())
if(a[0]==a[1]):
       print("Yes")
else:
       print("No")

### FIXED CODE ###

a=list(map(lambda x:x,input().split()))
if(a[0]==a[1]):
       print("Yes")
else:
       print("No")
a = input().isupper
if ture == a:
  print("A")
else:
  print("a")

### FIXED CODE ###

a = input().islower()

if a == 0:
  print("A")
else:
  print("a")
def main():
    n = input()
    s = input()
    raw_list = list(map(int, raw_list))

    max = raw_list[0]
    count = 1

    for i in range(1,len(raw_list)):
        if raw_list[i] >= max:
            count += 1
            max = raw_list[i]
    print (count)

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n = input()
    s = input()
    raw_list = list(map(int, s.split()))

    max = raw_list[0]
    count = 1

    for i in range(1,len(raw_list)):
        if raw_list[i] >= max:
            count += 1
            max = raw_list[i]
    print (count)

if __name__ == "__main__":
    main()
import copy

N, M=map(int, input().split())
A=list(map(int, input().split()))
BC=[]
for _ in range(M):
    BC.append(tuple(map(int, input().split())))
A=sorted(A)
BC=sorted(BC, key=lambda val:val[1], reverse=True)
#print(N,M,A,BC)


change=[]
for bc in BC:
    for _ in range(bc[0]):
        change.append(bc[1])
    if len(change)>=N:
        break
#print(change)

if A[0]>=change[0]:
    print(sum(A))
else:
    for i in range(len(change)):
        if A[i]>change[i]:
            answer = sum(change[:i]) + sum(A[i:])
            print(answer)
            break
    else:
        answer=sum(change[:i+1])+sum(A[i+1:])
        print(answer)


### FIXED CODE ###

import copy

N, M=map(int, input().split())
A=list(map(int, input().split()))
BC=[]
for _ in range(M):
    BC.append(tuple(map(int, input().split())))
A=sorted(A)
BC=sorted(BC, key=lambda val:val[1], reverse=True)
#print(N,M,A,BC)


change=[]
for bc in BC:
    for _ in range(bc[0]):
        change.append(bc[1])
    if len(change)>=N:
        break
#print(change)

if A[0]>=change[0]:
    print(sum(A))
else:
    for i in range(min(N,len(change))):
        if A[i]>change[i]:
            answer = sum(change[:i]) + sum(A[i:])
            print(answer)
            break
    else:
        answer=sum(change[:i+1])+sum(A[i+1:])
        print(answer)
import math 
N,D = map(int,input().split())
X=[]
count=0
for i in range(N):
    x = list(map(int,input().split()))
    X.append(x)
for i in range(N-1):
    for j in range(i,N):
        s = 0
        for k in range(N):
            s += (X[i][k]-X[j][k])**2
            if math.sqrt(s).is_integer():
                count += 1
print(count)

### FIXED CODE ###

import math 
N,D = map(int,input().split())
X=[]
count=0
for i in range(N):
    x = list(map(int,input().split()))
    X.append(x)
for i in range(N-1):
    for j in range(i+1,N):
        s = 0
        for k in range(D):
            s += (X[i][k]-X[j][k])**2
        if math.sqrt(s).is_integer():
            count += 1
print(count)
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) >= c:
  print("Yes")
  
else:
  print("No")
N =input()
if N.count(N[0])>2 or N.count(N[1]>2):
	print("Yes")
else: print("No")

### FIXED CODE ###

N = input()
if N[0]==N[1]==N[2] or N[1]==N[2]==N[3]:
	print("Yes")
else: print("No")
import sys
from collections import deque

input = sys.stdin.readline

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

a.sort()
tf = [True] * n

for j in range(n):
    if not tf[j]:
        pass
    else:
        for k in range(j+1, n):
            if tf[k] and a[k] % a[j] == 0:
                tf[k] = False
    #print(tf)

if a[0] % a[1] == 0:
    tf[0] = False

print(tf.count(True))






### FIXED CODE ###

import sys
from collections import deque

input = sys.stdin.readline

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

a.sort()
tf = [True] * a[-1]
dup = [False] * a[-1]


for i in range(n):
    if tf[a[i]-1] == True:
        #print(a[i])
        if dup[a[i]-1] == True:
            tf[a[i]-1] = False
        else:
            dup[a[i]-1] = True
            for j in range(a[i]*2, a[-1]+1, a[i]):
                tf[j-1] = False
                

c = 0

#print(tf)

for x in a:
    if tf[x-1]:
        c += 1

print(c)
from copy import deepcopy

import numpy as np


H, W = map(int, input().split())
field = np.array([[c == "." for c in input()] for _ in range(H)], dtype=np.int16)

u = deepcopy(field)
d = deepcopy(field)
l = deepcopy(field)
r = deepcopy(field)

for i in range(H):
    for j in range(1, W):
        if field[i, j]:
            l[i, j] = l[i, j - 1] + 1
        if field[i, W - j - 1]:
            r[i, W - j - 1] = r[i, W - j] + 1

for j in range(W):
    for i in range(1, H):
        if field[i, j]:
            u[i, j] = u[i - 1, j] + 1
        if field[H - i - 1, j]:
            d[H - i - 1, j] = d[H - i, j] + 1

print((u + d + l + r - 3).max())



### FIXED CODE ###

import numpy as np


H, W = map(int, input().split())
field = [[c == "." for c in input()] for _ in range(H)]
field = np.array(field, dtype=np.int16)

u = field.copy()
d = field.copy()
l = field.copy()
r = field.copy()

for i in range(1, H):
    u[i] = (u[i - 1] + 1) * u[i]
    d[-i - 1] = (d[-i] + 1) * d[-i - 1]

for j in range(1, W):
    l[:, j] = (l[:, j - 1] + 1) * l[:, j]
    r[:, -j - 1] = (r[:, -j] + 1) * r[:, -j - 1]

print((u + d + l + r - 3).max())
N, K = map(int,input().split())
D = list(input())
for i in range(N, 10000):
    M = list(str(i))
    if all([M[j] not in D for j in range(len(M))]):
        ans = int("".join(M))
        break
print(ans)

### FIXED CODE ###

N, K = map(int,input().split())
D = list(input())
for i in range(N, 100000):
    M = list(str(i))
    if all([M[j] not in D for j in range(len(M))]):
        ans = int("".join(M))
        break
print(ans)
counter = 1
while true:
    x = input()
    if x == 0 : 
        break
    print("Case {}: {}".format(counter,input()))



### FIXED CODE ###

ans = []
for i, x in enumerate(open(0).readlines()):
    ans.append("Case %d: %s" % (i+1, x))
open(1,'w').writelines(ans[:-1])
print((int(input())**2)

### FIXED CODE ###

print((int(input())**2))
def function(m, set1):
  set2 = set(str(m))
  if len(set1 & set2) > 0:
    return False
  else:
    return True
def function(n, set1):
  m = n
  while not function(m, set1):
    m += 1
  return m

line1 = input().split()
n = int(line1[0])
k = int(line1[1])
list1 = []
for i in range(k):
  list1.append(int(input()))
set1 = set(list1)

print(function(n, set1))
  

### FIXED CODE ###

def function1(m, set1):
  set2 = set(str(m))
  if len(set1 & set2) > 0:
    return False
  else:
    return True
def function(n, set1):
  m = n
  while not function1(m, set1):
    m += 1
  return m

line1 = input().split()
n = int(line1[0])
k = int(line1[1])
list1 = input().split()
set1 = set(list1)

print(function(n, set1))
def generate_square(rest, output=[10000]):                   
  for i in range(rest, 0, -1):                               
    if output[-1] >= i:                                      
        yield from generate_square(rest - i, output + [i])   
  if rest == 0:                                              
    yield output                                             
                                                             
                                                             
while 1:                                                     
  x = int(input().strip())                                   
  if x == 0:                                                 
    break                                                    
  generator = generate_square(x)                             
  for x in generator:                                        
    print(" ".join(map(str, x[1:])))                         
GN-2:python kodairatomonori$                                 
                                                             
                                                             

### FIXED CODE ###

def generate_square(rest, output=[10000]):                   
  for i in range(rest, 0, -1):                               
    if output[-1] >= i:                                      
        yield from generate_square(rest - i, output + [i])   
  if rest == 0:                                              
    yield output                                             
                                                             
                                                             
while 1:                                                     
  x = int(input().strip())                                   
  if x == 0:                                                 
    break                                                    
  generator = generate_square(x)                             
  for x in generator:                                        
    print(" ".join(map(str, x[1:])))
r,l=map(int,input().split())
v1,v2=r//2019,l//2019
if v2-v1>=1 or r%2019==0 or l%2019==0:
    print(0)
else:
    ans=2018
    for i in range(r,l):
        for j in range(i+1,l+1):
            ans=min(ans,(i*j)%2019)
print(ans)

### FIXED CODE ###

r,l=map(int,input().split())
v1,v2=r//2019,l//2019
if v2-v1>=1 or r%2019==0 or l%2019==0:
    print(0)
else:
    ans=2018
    for i in range(r,l):
        for j in range(i+1,l+1):
            ans=min(ans,(i*j)%2019)
    print(ans)
x,y = map(int,input().split())
if x > 12:
  print(y)
else if 6 <= x <= 12:
  print(y/2)
else:
  print(0)

### FIXED CODE ###

x,y = map(int,input().split())
if x >= 13:
  print(y)
elif 6 <= x <= 12:
  print(int(y/2))
else:
  print(0)
def resolve():
x,n  = map(int,input().split())
if(n==0):
    print(x)
    exit

p = list(map(int,input().split()))

l = list(range(min(p),max(p)+1))

rl =  set(l) - set(p)
m = max(p)
for i in  rl:
    if(abs(i-x) < m):
        m = abs(i-x)
        ans = i
print(ans)

### FIXED CODE ###

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

Q = [q for q in range(-1, 102) if q not in P]  # -1以上101以下整数のうちPに存在しないもの
ans = min(Q, key=lambda q: (abs(q - X), q))  # maspyさん解法
print(ans)
H,W,N=map(int,input().split())
K=max(H,W)
print(-(-N//K))

### FIXED CODE ###

H=int(input())
W=int(input())
N=int(input())
K=max(H,W)
print(-(-N//K))
X=int(input())
l=[2,3,5,7,11,13,17,19,23,29,31,37]
ans=[]
for i in l:
    tmp=i**2
    while tmp<=X:
        ans.append(tmp)
        tmp*=i

print(max(ans))

### FIXED CODE ###

X=int(input())
l=[i for i in range(2,32)]
ans=[1]
for i in l:
    tmp=i**2
    while tmp<=X:
        ans.append(tmp)
        tmp*=i

print(max(ans))
A,B,X=map(int,input().split())
x=min(10**9,int((X-B)/A)+1)
for  i in range(x):
  d=len(str(x-i))
  if A*(x-i)+B*d<=X:
    ans=x-i
    break
  if i==x-1:
    ans=0
print(ans)

### FIXED CODE ###

S=str(input())
list=["SUN","MON","TUE","WED","THU","FRI","SAT"]
for i in range(7):
  if S==list[i]:
    print(7-i)
S = int(input())
h = S // 3600
m  = (S % 3600) // 60
s = (S % 3600) % 60

print(h:m:s)

### FIXED CODE ###

S = int(input())
h = int(S // (60*60))
m = int(S / 60) % 60
s = S%60

print('{}:{}:{}'.format(h,m,s))
A=list(map(int,input().split()))
S=input()
 
S(A(1)-1).lower()
print(S)

### FIXED CODE ###

A=list(map(int,input().split()))
S=input()
S=S[0:(A[1]-1)]+S[A[1]-1].lower()+S[A[1]:A[0]]
print(S)
#B
count = 0
n,m,c = map(int, input().split())
b = list(map(int, input().split()))
for i in range(n):
    a = list(map(int, input().split()))
    ab=0
    for j in range(n):
        ab = a[j] * b[j]
    if -c<ab:
        count += 1
print(count)

### FIXED CODE ###

#A
H,W = map(int, input().split())
h,w = map(int, input().split())

print((H-h)*(W-w))
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    N,K = LI()
    a = LI()
    if max(a) < K:
        return 'IMPOSSIBLE'
    if K in a:
        return 'POSSIBLE'
    t = a[0]
    for c in a[1:]:
        t = math.gcd(c, t)
        if t <= 1:
            return 'POSSIBLE'
    for c in a:
        if (c > K) and (((c-K) % t) == 0):
            return 'POSSIBLE'

    return 'IMPOSSIBLE'


print(main())





### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

def gcd(a,b):
    while b>0:
        a,b = b,a
        b %= a
    return a

def main():
    N,K = LI()
    a = LI()
    if max(a) < K:
        return 'IMPOSSIBLE'
    if K in a:
        return 'POSSIBLE'
    t = a[0]
    for c in a[1:]:
        t = gcd(c, t)
        if t <= 1:
            return 'POSSIBLE'
    for c in a:
        if (c > K) and (((c-K) % t) == 0):
            return 'POSSIBLE'

    return 'IMPOSSIBLE'


print(main())
n,m=map(int,input().split())
box=list([map(int,input().split())] for i in range(n))
ans = 0
for i in (1,-1):
    for j in (1,-1):
        for k in (1,-1):
            cost=sorted(list(i*x+j*y+z*k for x,y,z in box))
            ans=max(ans,sum(cost[-m:]))
print(ans)

### FIXED CODE ###

n,m=map(int,input().split())
box=list(list(map(int,input().split())) for i in range(n))
ans = 0
for i in (1,-1):
    for j in (1,-1):
        for k in (1,-1):
            cost=list(i*x+j*y+z*k for x,y,z in box)
            cost.sort(reverse=True)
            ans=max(ans,sum(cost[:m]))
print(ans)
H = int(input()) 
A = int(input()) 
sum = 0
while H > 0 : 
  H = H - A
  sum = sum + 1
print(sum)

### FIXED CODE ###

n = list(map(int,input().split()))
H = n[0] 
A = n[1] 
sum = 0 
while H > 0 : 
    H = H - A 
    sum = sum + 1 
print(sum)
a,b=map(int,input().split())
k=(a+b)/2
print(k if ((a>=k and b<=k) or (a<=K and b>=k)) and k%2==0 else "IMPOSSIBLE")

### FIXED CODE ###

a,b=map(int,input().split())
print((a+b)//2 if (a+b)%2==0 else "IMPOSSIBLE")
from collections import deque

H, W = map(int, input().split())
S = [input() for i in range(H)]

q = deque()
q.append((0, 0))
dist = [[0 for j in range(W)] for i in range(H)]
dr = [(1,0),(-1,0),(0,1),(0,-1)]

while (True):
    r = q.popleft()
    x = r[1]
    y = r[0]
    now = dist[y][x]
    if y == H-1 and x == W-1:
        break
    for d in range(4):
        nx = x + dr[d][0]
        ny = y + dr[d][1]
        if 0 <= nx < W and 0 <= ny < H:
            if S[ny][nx] != "#" and dist[ny][nx] == 0:
                dist[ny][nx] = now+1
                q.append((ny,nx))
sharp = sum([i.count("#") for i in S])
print(H * W - now - sharp - 1)

### FIXED CODE ###

from collections import deque

H, W = map(int, input().split())
S = [input() for i in range(H)]
g = 0
q = deque()
q.append((0, 0))
dist = [[0 for j in range(W)] for i in range(H)]
dr = [(1,0),(-1,0),(0,1),(0,-1)]

while len(q):
    r = q.popleft()
    x = r[1]
    y = r[0]
    now = dist[y][x]
    if y == H-1 and x == W-1:
        g = 1
        break
    for d in range(4):
        nx = x + dr[d][0]
        ny = y + dr[d][1]
        if 0 <= nx < W and 0 <= ny < H:
            if S[ny][nx] != "#" and dist[ny][nx] == 0:
                dist[ny][nx] = now+1
                q.append((ny,nx))

sharp = sum([i.count("#") for i in S])
if  g == 1:
  print(H * W - now - sharp - 1)
else:
  print(-1)
N,K = map(int,input().split())
S = input()

A = [0]
B = [0]
for s in S:
  if s == '1':
    A[-1] += 1
  elif A[-1] != 0:
    A.append(0)
  if s == '0':
    B[-1] += 1
  elif B[-1] != 0:
    B.append(0)

ans = 0

c,d,e,f = 0,0,0,0

for i in range(min(len(A),len(B))):
  a = 0
  if i == 0:
    if S[0] == '1':
      c,d = sum(A[i:min(i + K + 1,len(A))]),sum(B[i:min(i + K,len(B))])
      a = c + d
    else:
      c,d = sum(A[i:min(i + K,len(A))]) , sum(B[i:min(i + K,len(B))])
      a = c + d
  else:
    if S[0] == '1':
      if i + K <= len(A):
        c += A[min(i + K,len(A) - 1)] - A[i - 1]
        d += B[min(i + K - 1,len(A) - 1)] - B[i - 1]
        a = c + d
    else:
      if i + K <= len(A):
        c += A[min(i + K - 1,len(A) - 1)] - (0 if i == 1 else A[i - 2])
        d += B[min(i + K - 1,len(A) - 1)] - B[i - 1]
        a = c + d
  ans = max(ans,a)
print(ans)

### FIXED CODE ###

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

A = [0]
B = [0]
for s in S:
  if s == '1':
    A[-1] += 1
  elif A[-1] != 0:
    A.append(0)
  if s == '0':
    B[-1] += 1
  elif B[-1] != 0:
    B.append(0)

ans = 0
c,d,e,f = 0,0,0,0

for i in range(min(len(A),len(B))):
  a = 0
  if i == 0:
    if S[0] == '1':
      c,d = sum(A[i:min(i + K + 1,len(A))]),sum(B[i:min(i + K,len(B))])
      a = c + d
    else:
      c,d = sum(A[i:min(i + K,len(A))]) , sum(B[i:min(i + K,len(B))])
      a = c + d
  else:
    if S[0] == '1':
      if i + K < len(A):
        c += A[min(i + K,len(A) - 1)] - A[i - 1]
        d += B[min(i + K - 1,len(B) - 1)] - B[i - 1]
        a = c + d
    else:
      if i + K <= len(A):
        c += A[min(i + K - 1,len(A) - 1)] - (0 if i == 1 else A[i - 2])
        d += B[min(i + K - 1,len(B) - 1)] - B[i - 1]
        a = c + d
  ans = max(ans,a)
print(ans)
#168 - F
import sys
import numpy as np
#from numba import njit


N, M = map(int, sys.stdin.buffer.readline().split())
LineData = np.int64(sys.stdin.buffer.read().split())

INF = 10**9 + 1

LineData = LineData.reshape(-1, 3)
A, B, C = LineData[:N].T
D, E, F = LineData[N:].T
#X = np.unique(np.concatenate([D, [-INF, 0, INF]]))
#Y = np.unique(np.concatenate([C, [-INF, 0, INF]]))
X = np.unique(np.concatenate([D, [-INF, INF]]))
Y = np.unique(np.concatenate([C, [-INF, INF]]))
A = np.searchsorted(X, A)
B = np.searchsorted(X, B, 'right') - 1
C = np.searchsorted(Y, C)
D = np.searchsorted(X, D)
E = np.searchsorted(Y, E)
F = np.searchsorted(Y, F, 'right') - 1

x = np.searchsorted(X, 0, 'right') - 1
y = np.searchsorted(Y, 0, 'right') - 1

DX = X[1:] - X[:-1]
DY = Y[1:] - Y[:-1]

A = A.tolist()
B = B.tolist()
C = C.tolist()
D = D.tolist()
E = E.tolist()
F = F.tolist()
X = X.tolist()
Y = Y.tolist()
DX = DX.tolist()
DY = DY.tolist()

LenX = len(X)
LenY = len(Y)

visit = [[False] * LenY for _ in range(LenX)]
visit[x][y] = True
area = 0
queue = [(x, y)]

LineX = [[False] * LenY for _ in range(LenX)]
LineY = [[False] * LenY for _ in range(LenX)]

#for x1, x2, y in zip(A, B, C):
#    for x in range(x1, x2):
#        LineY[x][y] = True
for i in range(len(A)):
    y = C[i]
    for x in range(A[i], B[i]):
        LineY[x][y] = True

#for x, y1, y2 in zip(D, E, F):
#    for y in range(y1, y2):
#        LineX[x][y] = True
for i in range(len(D)):
    x = D[i]
    for y in range(E[i], F[i]):
        LineX[x][y] = True

LenX -= 1
LenY -= 1

while queue:
    x, y = queue.pop()
    
    if x == 0 or x == LenX or y == 0 or y == LenY:
        area = 0
        break
    
    area += DX[x] * DY[y]
    
    x1 = x - 1
    if not LineX[x][y] and not visit[x1][y]:
        visit[x1][y] = True
        queue.append((x1, y))
    y1 = y - 1
    if not LineY[x][y] and not visit[x][y1]:
        visit[x][y1] = True
        queue.append((x, y1))
    x1 = x + 1
    if not LineX[x1][y] and not visit[x1][y]:
        visit[x1][y] = True
        queue.append((x1, y))
    y1 = y + 1
    if not LineY[x][y1] and not visit[x][y1]:
        visit[x][y1] = True
        queue.append((x, y1))

if area == 0:
    print("INF")
else:
    print(area)


### FIXED CODE ###

import sys
import os

n = input()
n = n[-1]

if n == "2" or n == "4" or n == "5" or n == "7" or n == "9":
    print("hon")
elif n == "0" or n == "1" or n == "6" or n == "8":
    print("pon")
elif n == "3":
    print("bon")

sys.exit()
n,m=map(int,input().split())
a=[]
for i in range(0,m):
    num=int(input())
    a.append(num)
    n-=a[i]
if n<=0:
    print(-1)
else:
    print(n)

### FIXED CODE ###

n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(0,m):
    n-=a[i]
if n<0:
    print(-1)
else:
    print(n)
_ = input()
H = list(map(int, input().split()))

def jump(i):
    if i == 0:
        return 0
    a = abs(H[i] - H[i - 1]) + jump(i - 1)
    if i == 1:
        return a
    b = abs(H[i] - H[i - 2]) + jump(i - 2)
    return min(a, b)

print(jump(len(H) - 1))



### FIXED CODE ###

N = int(input())

H = [int(v) for v in input().strip().split(' ')]

dp = [int(10 ** 10)] * N

dp[0] = 0
dp[1] = abs(H[0] - H[1])

for i in range(2, N):
    dp[i] = min(dp[i], dp[i - 1] + abs(H[i] - H[i - 1]))
    dp[i] = min(dp[i], dp[i - 2] + abs(H[i] - H[i - 2]))

print(dp[-1])
n, x = map(int, input().split())

l_list = list(map(int, input().split()))

tmp = 0
for i in range(100):
    tmp += l_list[i]
    if tmp > x:
        break

if tmp =< x:
    print(101)
else:
    print(i+1)


### FIXED CODE ###

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

l_list = list(map(int, input().split()))

tmp = 0
for i in range(n):
    tmp += l_list[i]
    if tmp > x:
        break

if tmp <= x:
    print(101)
else:
    print(i+1)
def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = map(int, input().split())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    if v-w <= 0:
        print("NO")
    else:
        if (v-w) * t < abs(a-b):
            print("NO")
        else:
            print("YES")


resolve()

### FIXED CODE ###

def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    if v-w <= 0 or (v-w) * t < abs(a-b):
        print("NO")
    else:
        # if (v-w) * t < abs(a-b):
        #     print("NO")
        # else:
        print("YES")
resolve()