Buggy python submission (verdict: Runtime Error):
n = int(input())
numbersA = input().split()
numbersB = input().split()
diff = []
plusTotal = 0
minousTotal = 0

for i in range(0,n):
	diff.append((int(numbersB[i]) - int(numbersA[i])))
	if diff[i] < 0:
		minousTotal += diff[i]
	else:
		plusTotal += diff[i] // 2


print(plusTotal)

if plusTotal >= abs(minousTotal):
	print("Yes")
else:
	print("No")

Fixed submission:
inp = input().split()

i = 1
x = 0

while i <= pow(10,18):
	if inp[0] == "1" and inp[1] == "1":
		print(-1)
		x = 1
		break
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		x = 1
		break
	i *= int(inp[0])

if x == 0:
	print(-1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
numbersA = input().split()
numbersB = input().split()
diff = []
plusTotal = 0
minousTotal = 0

for i in range(0,n):
	diff.append((int(numbersB[i]) - int(numbersA[i])))
	if diff[i] < 0:
		minousTotal += diff[i]
	else:
		plusTotal += diff[i] / 2


if plusTotal >= abs(minousTotal):
	print("Yes")
else:
	print("No")

Fixed submission:
inp = input().split()

i = 1
x = 0

while i <= pow(10,18):
	if inp[0] == "1" and inp[1] == "1":
		print(-1)
		x = 1
		break
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		x = 1
		break
	i *= int(inp[0])

if x == 0:
	print(-1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
numbersA = input().split()
numbersB = input().split()
diff = []
plusTotal = 0
minousTotal = 0

for i in range(0,n):
	diff.append((int(numbersB[i]) - int(numbersA[i])))
	if diff[i] < 0:
		minousTotal += diff[i]
	else:
		plusTotal += diff[i] / 2


if plusTotal >= abs(minousTotal):
	print("Yes")
else:
	print("No")

Fixed submission:
inp = input().split()

i = 1
x = 0

while i <= pow(10,18):
	if inp[0] == "1" and inp[1] == "1":
		print(-1)
		x = 1
		break
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		x = 1
		break
	i *= int(inp[0])

if x == 0:
	print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
inp = input().split()

i = 1
x = 0

while i <= pow(10,18):
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		x = 1
		break
	i *= int(inp[0])


if x == 0:
	print(-1)

Fixed submission:
inp = input().split()

i = 1
x = 0

while i <= pow(10,18):
	if inp[0] == "1" and inp[1] == "1":
		print(-1)
		x = 1
		break
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		x = 1
		break
	i *= int(inp[0])

if x == 0:
	print(-1)

Buggy python submission (verdict: Runtime Error):
inp = input().split()

i = 1
x = 0
while i <= pow(10,18):
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
                x = 1
		break
	i *= int(inp[0])


if x == 0:
	print(-1)

Fixed submission:
inp = input().split()

i = 1
x = 0

while i <= pow(10,18):
	if inp[0] == "1" and inp[1] == "1":
		print(-1)
		x = 1
		break
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		x = 1
		break
	i *= int(inp[0])

if x == 0:
	print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
inp = input().split()

i = 1

while i <= pow(10,18):
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		break
	i *= int(inp[0])


if i >= pow(10,18):
	print(-1)

Fixed submission:
inp = input().split()

i = 1
x = 0

while i <= pow(10,18):
	if inp[0] == "1" and inp[1] == "1":
		print(-1)
		x = 1
		break
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		x = 1
		break
	i *= int(inp[0])

if x == 0:
	print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
inp = input().split()

# for i in range(1,1000000000000000000):
i = 1

while i <= 1000000000000000000:
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		break
	i *= int(inp[0])


if i >= 1000000000000000000:
	print(-1)

Fixed submission:
inp = input().split()

i = 1
x = 0

while i <= pow(10,18):
	if inp[0] == "1" and inp[1] == "1":
		print(-1)
		x = 1
		break
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		x = 1
		break
	i *= int(inp[0])

if x == 0:
	print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
inp = input().split()

# for i in range(1,1000000000000000000):
i = 1

while i <= 1000000000000000000:
	i *= int(inp[0])
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		break

if i >= 1000000000000000000:
	print(-1)

Fixed submission:
inp = input().split()

i = 1
x = 0

while i <= pow(10,18):
	if inp[0] == "1" and inp[1] == "1":
		print(-1)
		x = 1
		break
	if i % int(inp[0])  == 0 and i % int(inp[1]) != 0:
		print(i)
		x = 1
		break
	i *= int(inp[0])

if x == 0:
	print(-1)