Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split())
 
for x in range(N+1):
  for y in range(N-x+1):
    z = N - x - y
    if 10000 * x + 5000 * y + 1000 * z == Y:
      print(x,y,z)
      exit()
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
 
for x in range(N+1):
  for y in range(N-x+1):
    z = N - x - y
    if 10000 * i + 5000 * j + z*1000 == Y:
      print(x,y,z)
      exit()

print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(N+1):
	for y in range(N+1-x):
		for z in range(N+1-x-y):
   			if Y == 10000*x+5000*y+1000*z :
    			print(x,y,z)
    			exit()
print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(N+1):
	for y in range(N+1-x):
		for z in range(N+1-x-y):
   			if (Y==10000*x+5000*y+1000*z):
    			print(x,y,z)
    			exit()
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(N+1):
	for y in range(N+1-x):
		for z in range(N+1-x-y)			:
   			if (Y==10000*x+5000*y+1000*z):
    			print(x,y,z)
    			exit()
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(N+1)
	for y in range(N+1-x)
		for z in range(N+1-x-y)			
   			if (Y==10000*x+5000*y+1000*z):
    			print(x,y,z)
    			exit()
            else:
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(N+1)
	for y in range(N+1-x)
		for z in range(N+1-x-y)			
   			if Y==10000*x+5000*y+1000*z:
    			print(x,y,z)
    			exit()
            
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(0,N+1)
	for y in range(0,N+1-x)
		for z in range(0,N+1-x-y)			
   			if Y==10000*x+5000*y+1000*z:
    			print(x,y,z)
    			exit()
            else:
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(0,N+1)
	for y in range(0,N+1-x)
		for z in range(0,N+1-x-y)			
   			if Y==10000*x+5000*y+1000*z:
    			print(x,y,z)
    			exit()
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(0,N+1)
	for y in range(0,N+1)		
		for z in range(0,N+1)			
   			if Y==10000*x+5000*y+1000*z:
    			print(x,y,z)
    			exit()
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(0,N)
	for y in range(0,N)		
		for z in range(0,N)			
   			if Y==10000*x+5000*y+1000*z:
    			print(x,y,z)
    			break
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(0,N)
	for y in range(0,N-x)
		if N-x<0
			break
		for z in range(0,N-x-y)
			if N-x-y<0
    			continue
   			if Y==10000*x+5000*y+1000*z:
    			print(x,y,z)
    			break
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(0,N)
	for y in range(0,N-x)
		if N-x<0
			break
		for z in range(0,N-x-y)
			if N-x-y<0
    			break
   			if Y==10000*x+5000*y+1000*z:
    			print(x,y,z)
    			break
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(0,N)
	for y in range(0,N-x)
		if N-x<0
			break
		for z in range(0,N-x-y)
			if N-x-y<0
    		break
   			if Y==10000*x+5000*y+1000*z:
    		print(x,y,z)
    		break
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for i1 in range(0,N)
 for i2 in range(0,N-i1)
  if N-i1<0
   break
  for i3 in range(0,N-i1-i2)
   if N-i1-i2<0
    break
   if Y==10000*i1+5000*i2+1000*i3:
    print(i1,i2,i3)
    break
  else:
 else:
else:

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for i1 in range(0,N)
	for i2 in range(0,N-i1)
  		if N-i1<0
    		break
  		for i3 in range(0,N-i1-i2)
        	if N-i1-i2<0
          		break
    		if Y==10000*i1+5000*i2+1000*i3:
        		print(i1,i2,i3)
          		break
        else:
    else:
else:

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for i1 in range(0,N)
	for i2 in range(0,N-i1)
  		if N-i1<0
    		break
  		for i3 in range(0,N-i1-i2)
        	if N-i1-i2<0
          		break
    		if Y==10000*i1+5000*i2+1000*i3:
        		print(i1,i2,i3)
          		break
            else:
        else:
    else:
else:

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for i1 in range(N)
	for i2 in range(N)
  		for i3 in range(N)
    		if Y==10000*i1+5000*i2+1000*i3:
        		print(i1,i2,i3)
          		break
            else: