Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
node=[]
if n%2==0:
    for i in range(n):
        for j in range(i,n):
            if j==i or j==n-1-i:
                continue
            node.append((i+1,j+1))
else:
    for i in range(n):
        for j in range(i,n):
            if j==i or j==n-2-i:
                continue
            node.append((ix+1,j+1))
    
print(len(node))
for i in node:
    print(*i) 

Fixed submission:
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
node=[]
if n%2==0:
    for i in range(n):
        for j in range(i,n):
            if j==i or j==n-1-i:
                continue
            node.append((i+1,j+1))
else:
    for i in range(n):
        for j in range(i,n):
            if j==i or j==n-2-i:
                continue
            node.append((i+1,j+1))
    
print(len(node))
for i in node:
    print(*i)
Buggy python submission (verdict: Time Limit Exceeded):
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
#import heapq
from fractions  import gcd
#input=sys.stdin.readline
import bisect
n=int(input())
s=list(input())
c=Counter(s)
c=c.values()
ans=len(s)
mod=10**9+7
for i in range(2,len(c)+1):
    for l in itertools.combinations(c,i):
        res=1
        for j in l:
            res*=j
            res%=mod
        ans+=res
        ans%=mod
print(ans)

Fixed submission:
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
#import heapq
from fractions  import gcd
#input=sys.stdin.readline
import bisect
n=int(input())
s=list(input())
c=Counter(s)
c=c.values()
ans=1
mod=10**9+7
for i in c:
    ans*=(i+1)
    ans%=mod
print(ans-1)
Buggy python submission (verdict: Runtime Error):
#import sys
#import numpy as np
#import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
ans=0c
for i in range(n):
    a=list(map(int,input().split()))
    res=[a[i]*b[i] for i in range(m)]
    if sum(res)+c>0:
        ans+=1
print(ans)

Fixed submission:
#import sys
#import numpy as np
#import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
ans=0
for i in range(n):
    a=list(map(int,input().split()))
    res=[a[i]*b[i] for i in range(m)]
    if sum(res)+c>0:
        ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
#python 2.7
n,m=map(int,input().split())
ab=[list(map(int,input().split()))]
ab=sorted(ab,key=lambda x:x[0])
res=ans=0
for i in range(n):
  if res+ab[i][1]>=m:
    ans+=(ab[i][0])*(m-res)
    break
  else:
    ans+=(ab[i][0])*ab[i][1]
    res+=ab[i][1]
print(ans)

Fixed submission:
#import sys
#import numpy as np
#import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
n,m=map(int,input().split())
b=[list(map(int,input().split())) for _ in range(n)]
res=0
ans=0
b.sort(key=lambda x: x[0])
for i in range(n):
    if res+b[i][1]<=m:
        ans+=b[i][0]*b[i][1]
        res+=b[i][1]
    else:
        ans+=b[i][0]*(m-res)
        break
print(ans)
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
a=[input() for _ in range(h)]

res=[]
for i in range(h):
    if "#" not in a[i]:
      res.append(i)
for i in res:
  a.pop(i)
res=[]
h=len(a)
for i in range(w):
    for j in range(len(a)):
      if a[j][i]=="#":
        break
    else:
      res.append(j)
for i in res:
  for j in range(len(a)):
    a[j]=a[j][:i]+a[j][i+1:]
for i in a:
  print(*i)

Fixed submission:
h,w=map(int,input().split())
a=[input() for _ in range(h)]
res=[]
for i in range(h):
    if "#" not in a[i]:
      res.append(i)

resh=[]
h=len(a)
for i in range(w):
    for j in range(len(a)):
      if a[j][i]=="#":
        break
    else:
      resh.append(i)
for i in range(h):
  for j in range(w):
    if i not in res and j not in resh:
      print(a[i][j],end="")
  if i not in res:
    print("")
Buggy python submission (verdict: Time Limit Exceeded):
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
a=list(map(int,input().split()))

s=0
e=1
ans=n
while True:
    if s==e:
      e+=1
      continue
    if s==n-1:
      
      break
    res=sum(a[s:e])
    for i in range(20):
        if res&(1<<i)!=0 and a[e]&(1<<i)!=0:
            s+=1
            ans+=(e-s)
            break
    else:
        e+=1
    if e==n:
      s+=1
      ans+=(e-s)
      e=n-1
print(ans)

Fixed submission:
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
a=list(map(int,input().split()))

s=0
e=1
ans=n
acc=[0]*(n+1)
for i in range(n):
  acc[i+1]=acc[i]+a[i]
while True:
    if s==e:
      e+=1
      continue
    if s==n-1:
      
      break
    res=acc[e]-acc[s]
    for i in range(20):
        if res&(1<<i)!=0 and a[e]&(1<<i)!=0:
            s+=1
            ans+=(e-s)
            break
    else:
        e+=1
    if e==n:
      s+=1
      ans+=(e-s)
      e=n-1
print(ans)
Buggy python submission (verdict: Runtime Error):
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
s=input()
k=int(input())
n=len(s)
a=[chr(i) for i in range(ord('a'),ord('z')+1)]
ans=set()
for i in a:
    if i not in s:
        continue
    if len(ans)>=5:
        break
    for c in range(n):
      if s[c]==i:
          l=c
          r=c
          ans.add(s[l])
          while True:
            if  r>n or s[r]==i:
                break
            ans.add(s[l:r+1])
            r+=1
ans=list(ans)
ans.sort()
print(ans[k-1])

Fixed submission:
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
s=input()
k=int(input())
n=len(s)
a=[chr(i) for i in range(ord('a'),ord('z')+1)]
ans=set()
for i in a:
    if i not in s:
        continue
    if len(ans)>=5:
        break
    for c in range(n):
      if s[c]==i:
          l=c
          r=c
          while True:
            if  r>n or r-l>6:
                break
            ans.add(s[l:r+1])
            r+=1
ans=list(ans)
ans.sort()
print(ans[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
s=input()
k=int(input())
n=len(s)
a=[chr(i) for i in range(ord('a'),ord('z')+1)]
ans=set()
for i in a:
    if i not in s:
        continue
    if len(ans)>=5:
        break
    for c in range(n):
      if s[c]==i:
          l=c
          r=c
          while True:
            if  r>n:
                break
            ans.add(s[l:r+1])
            r+=1
ans=list(ans)
ans.sort()
print(ans[k-1])

Fixed submission:
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
s=input()
k=int(input())
n=len(s)
a=[chr(i) for i in range(ord('a'),ord('z')+1)]
ans=set()
for i in a:
    if i not in s:
        continue
    if len(ans)>=5:
        break
    for c in range(n):
      if s[c]==i:
          l=c
          r=c
          while True:
            if  r>n or r-l>6:
                break
            ans.add(s[l:r+1])
            r+=1
ans=list(ans)
ans.sort()
print(ans[k-1])
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p=list(map(int,input().split()))
m=0
d=[]
t=[]
for i in range(n):
    if p[i]==i+1:
        d.append(i)
for i in range(1,len(d)):
    if d[i]==1+d[i-1] and i-1 not in t:
        t.append(i)
        t.append(i-1)
print(len(d)-len(t)//2)

Fixed submission:
n=int(input())
p=list(map(int,input().split()))
m=0
d=[0]*n
t=set()
for i in range(n):
    if p[i]==i+1:
        d[i]=i+1
        m+=1
    if i!=0 and d[i]==1+d[i-1] and i-1 not in t:
        t.add(i)
print(m-len(t))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p=list(map(int,input().split()))
m=0
d=[]
t=[]
for i in range(n):
    if p[i]==i+1:
        d.append(i)
for i in range(1,len(d)):
    if d[i]==1+d[i-1] and i-1 not in t:
        t.append(i)
        t.append(i-1)
print(len(d)-len(t)//2)

Fixed submission:
n=int(input())
p=list(map(int,input().split()))
m=0
d=[0]*n
t=set()
for i in range(n):
    if p[i]==i+1:
        d[i]=i+1
        m+=1
    if i!=0 and d[i]==1+d[i-1] and i-1 not in t:
        t.add(i)
print(m-len(t))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int , input().split()))
res=[0]*n
res[0]=a[0]
c=0
for i in range(1,n):
    res[i]=res[i-1]+a[i]


for i in range(1,n):
    s=sum(a[:i])
    if s*sum(a[:i+1])>=0:
        c+=abs(a[i]+s)+1
        if s>0:
            a[i]=-s-1
        else:
            a[i]=-s+1
print(c)

Fixed submission:
n=int(input())
a=list(map(int , input().split()))
res_o=[0]*n
res_e=[0]*n
res_o[0]=a[0]
res_e[0]=a[0]

o=0
e=0

if res_o[0]<=0:
    o+=1-res_o[0]
    res_o[0]=1
if res_e[0]>=0:
    e+=res_e[0]+1
    res_e[0]=-1

for i in range(1,n):
    res_o[i]=res_o[i-1]+a[i]
    res_e[i]=res_e[i-1]+a[i]
    if i%2==0 and res_o[i]<=0:
        o+=(1-res_o[i])
        res_o[i]=1
    elif i%2==1 and res_o[i]>=0:
        o+=(res_o[i]+1)
        res_o[i]=-1
    if i%2==0 and res_e[i]>=0:
        e+=(1+res_e[i])
        res_e[i]=-1
    elif i%2==1 and res_e[i]<=0:
        e+=(1-res_e[i])
        res_e[i]=1
print(min(e,o))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
#import numpy as np
#import math
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
input=sys.stdin.readline

n,m=map(int,input().split())
node=[[] for _ in range(n)] 
for i in range(m):
    a,b=map(int,input().split())
    node[a-1].append(b)
    node[b-1].append(a)
d=deque()
d.append(1)
d.append(node[0][0])
f=True
while True:
    f=True
    for i in node[d[0]-1]:
        if i not in d:
          d.appendleft(i)
          f=False
          break
    for i in node[d[-1]-1]:
        if i not in d:
            d.append(i)
            f=False
            break
    if f:
        print(len(d))
        print(*d)
        exit()

Fixed submission:
import sys
#import numpy as np
#import math
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
input=sys.stdin.readline

n,m=map(int,input().split())
node=[[] for _ in range(n)] 
for i in range(m):
    a,b=map(int,input().split())
    node[a-1].append(b)
    node[b-1].append(a)
d=deque()
d.append(1)
d.append(node[0][0])
s=set(d)
f=True
while True:
    f=True
    for i in node[d[0]-1]:
        if i not in s:
          d.appendleft(i)
          s.add(i)
          f=False
          break
    for i in node[d[-1]-1]:
        if i not in s:
            d.append(i)
            s.add(i)
            f=False
            break
    if f:
        print(len(d))
        print(*d)
        exit()
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
a.sort()
d=[0]*n
d[0]=1

for i in range(1,n):
    if a[i]>2*sum(a[:i]):
        d[i]=1
    else:
        d[i]=d[i-1]+1
print(d[n-1])

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort()
d=[0]*n
d[0]=1
s=[0]*n
s[0]=a[0]

for i in range(1,n):
  s[i]=s[i-1]+a[i]
for i in range(1,n):
    if a[i]>2*s[i-1]:
        d[i]=1
    else:
        d[i]=d[i-1]+1
print(d[n-1])
Buggy python submission (verdict: Time Limit Exceeded):
import math
n=int(input())

ans=0
for i in range(1,n):
  num=n-i
  m=round(math.sqrt(num))
  for j in range(1,m+1):
    if num%j==0 and num//j==j:
      ans+=1
    elif num%j==0 and num//j!=j:
      ans+=2
print(ans)

Fixed submission:
import math
n=int(input())
m=round(math.sqrt(n))
ans=0
for i in range(1,n):
  res=n//i
  if n%i==0:
    ans+=res-1
  else:
    ans+=res
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

ans=0
for i in range(n):
  p=a.pop()
  q=sum(a)
  ans+=p*q
print(ans%(10**9+7))

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

s=sum(a)
ans=0
for i in range(n-1):
  s-=a[i]
  ans+=s*a[i]
print(ans%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

ans=0
for i in range(n-1):
  for j in range(i+1, n):
    ans+=(a[i]*a[j])
print(ans%(10**9+7))

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

s=sum(a)
ans=0
for i in range(n-1):
  s-=a[i]
  ans+=s*a[i]
print(ans%(10**9+7))
Buggy python submission (verdict: Time Limit Exceeded):
from math import gcd
from functools import reduce
n=int(input())
a=list(map(int,input().split()))
d=[0]*(10**6)
for i in a:
  d[i-1]+=1
num=2
while num<=10**6:
  if sum([d[i*num-1] for i in range(1,10**6//num+1)])>1:
      break
  num+=1
else:
  print('pairwise coprime')
  exit()
g=reduce(gcd,a)
if g==1:
  print('setwise coprime')
  exit()

print('not coprime')

Fixed submission:
from math import gcd
from functools import reduce
n=int(input())
a=list(map(int,input().split()))
d=[0]*(10**6)
for i in a:
  d[i-1]+=1
num=2
while num<=10**6:
  if sum([d[i*num-1] for i in range(1,10**6//num+1)])>1:
      break
  num+=1
else:
  print('pairwise coprime')
  exit()
g=reduce(gcd,a)
if g==1:
  print('setwise coprime')
  exit()

print('not coprime')
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())

n = 1
m = 7
while True:
  if k == 2:
    print('-1')
    exit()
  if m % k != 0:
    n += 1
    m += 7*(10**(n-1))
  else:
    print(n)
    exit()

Fixed submission:
k = int(input())
m = 0

for i in range(1, k+1):
  if i == 1:
    m = 7
  else:
    m = (m*10 + 7) % k
  if m % k == 0:
    print(i)
    exit()
    
print('-1')
Buggy python submission (verdict: Runtime Error):
n = int(input())
res = n % 26

A = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s',
     't','u','v','w','x','y','z']

ans = []
while n//26 > 0 :
  res = n % 26
  if res % 26 != 0:
    ans.append(A[res-1])
  elif res % 26 == 0:
    ans .append(A[25])
  n = n // 26

if res != 0:
  ans.append(A[res-1])
elif res == 0:
  ans.append(A[25])
print(*ans[::-1], sep='')

Fixed submission:
a = input()

if a.islower() == True:
  print('a')
else:
  print('A')
Buggy python submission (verdict: Runtime Error):
x, n = map(int, input().split())
if n == 0:
  print(x)
else:
  p = list(map(int, input().split()))
  ans = []

  for i in range(n-2):
    if x-i not in p:
      ans.append(-i)
      break
    elif x+i not in p:
      ans.append(i)
      break
    else:
      ans.append(-3)
  print(x+ans[0])

Fixed submission:
x, n = map(int, input().split())

if n == 0:
  print(x)
else:
  p = list(map(int, input().split()))
  for j in range(0, int(n/2)+ 2):
    #print(j)
    if x-j not in p:
      print(x-j)
      break
    else:
      if x+j not in p:
        print(x+j)
        break

Buggy python submission (verdict: Runtime Error):
x, n = map(int, input().split())
if n == 0:
  print(x)
else:
  p = list(map(int, input().split()))
  ans = []

  for i in range(n-2):
    if x-i not in p:
      ans.append(-i)
      break
    elif x+i not in p:
      ans.append(i)
      break
  print(x+ans[0])

Fixed submission:
x, n = map(int, input().split())

if n == 0:
  print(x)
else:
  p = list(map(int, input().split()))
  for j in range(0, int(n/2)+ 2):
    #print(j)
    if x-j not in p:
      print(x-j)
      break
    else:
      if x+j not in p:
        print(x+j)
        break

Buggy python submission (verdict: Runtime Error):
x, n = map(int, input().split())
p = list(map(int, input().split()))
ans = []
if n == 0:
  print(x)
else:
  for i in range(n-2):
    if x-i not in p:
      ans.append(-i)
      break
    elif x+i not in p:
      ans.append(i)
      break
  print(x+min(ans))

Fixed submission:
x, n = map(int, input().split())

if n == 0:
  print(x)
else:
  p = list(map(int, input().split()))
  for j in range(0, int(n/2)+ 2):
    #print(j)
    if x-j not in p:
      print(x-j)
      break
    else:
      if x+j not in p:
        print(x+j)
        break
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=1
cnt=0
while cnt<n:
  if a[cnt]==0:
    print(0)
    exit()
  ans*=a[cnt]
  cnt+=1
if ans>10**18:
  print(-1)
  exit()
print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=1
if 0 in a:
  print(0)
  exit()
for i in a:
  ans*=i
  if ans>10**18:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=1
for i in range(n):
  ans*=a[i]
if ans>10**18:
  print(-1)
  exit()
print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=1
if 0 in a:
  print(0)
  exit()
for i in a:
  ans*=i
  if ans>10**18:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
a = a.astype(np.object)
ans = np.prod(a)
if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=1
if 0 in a:
  print(0)
  exit()
for i in a:
  ans*=i
  if ans>10**18:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())), dtype=object)

ans = np.prod(a)
if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=1
if 0 in a:
  print(0)
  exit()
for i in a:
  ans*=i
  if ans>10**18:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
a = list(map(int, input().split()))

v = np.array(a, dtype=object)
ans = np.prod(v)
if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=1
if 0 in a:
  print(0)
  exit()
for i in a:
  ans*=i
  if ans>10**18:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
a = list(map(int, input().split()))

v = np.array(a, dtype=object)
ans = np.prod(v)
if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=1
if 0 in a:
  print(0)
  exit()
for i in a:
  ans*=i
  if ans>10**18:
    print(-1)
    exit()
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

ans = 1
for i in a:
  ans = ans * i
  
if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=1
if 0 in a:
  print(0)
  exit()
for i in a:
  ans*=i
  if ans>10**18:
    print(-1)
    exit()
print(ans)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
a=list(map(int,input().split()))
data=[0]*(n+1)
data[1]=1
ans=[1]
res=0
for i in range(n):
  p=a[res]
  if data[p]==0:
    data[p]=1
    ans.append(p)
    res=p-1
  else:
    res=ans.index(p)
    break
if len(ans)>=k:
  print(ans[k])
else:
  m=len(ans)-res
  k-=res
  d=k%m
  print(ans[res+d])

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))
data=[0]*(n+1)
data[1]=1
ans=[1]
res=0
for i in range(n):
  p=a[res]
  if data[p]==0:
    data[p]=1
    ans.append(p)
    res=p-1
  else:
    res=ans.index(p)
    break
if len(ans)>k:
  print(ans[k])
else:
  m=len(ans)-res
  k-=res
  d=k%m
  print(ans[res+d])
Buggy python submission (verdict: Runtime Error):
x=int(input())
y=0
while True:
  z=x+y**5
  if z**(1/5)==int(z**(1/5)):
    print(int(z**(1/5)), y)
    exit()
  w=x-y**5
  if w**(1/5)==int(w**(1/5)):
    print(int(w**(1/5)), -y)
    exit()
  y+=1

Fixed submission:
x=int(input())
for i in range(-118,120):
  for j in range(-119,1119):
    if i**5-j**5==x:
      print(i,j)
      exit()

Buggy python submission (verdict: Runtime Error):
x=int(input())
y=0
while True:
  z=x+y**5
  if z**(1/5)==int(z**(1/5)):
    print(int(z**(1/5)), y)
    exit()
  z=x-y**5
  if z**(1/5)==int(z**(1/5)):
    print(int(z**(1/5)), -y)
    exit()
  y+=1
  

Fixed submission:
x=int(input())
for i in range(-118,120):
  for j in range(-119,1119):
    if i**5-j**5==x:
      print(i,j)
      exit()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [i for i in map(int, input().split())]

for j in range(1,n+1):
  print(a.count(j))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans= [0] * n
         
for i in range(n-1):
    ans[a[i] - 1] += 1

for j in range(n):
    print(ans[j])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [i for i in map(int, input().split())]
for j in range(1, n+1):
  ans = a.count(j)
  print(ans)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans= [0] * n
         
for i in range(n-1):
    ans[a[i] - 1] += 1

for j in range(n):
    print(ans[j])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [i for i in map(int, input().split())]

for j in range(1, n+1):
  print(a.count(j))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans= [0] * n
         
for i in range(n-1):
    ans[a[i] - 1] += 1

for j in range(n):
    print(ans[j])
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
S = []
C = []
for i in range(m):
  s,c = map(int, input().split())
  S.append(s)
  C.append(c)
  
for j in range(m):
  if S[j] == 1 and C[j] == 0:
    print('-1')
    break
  elif S[j] in S:
    l = S.index(S[j])
    if C[l] != C[j]:
      print('-1')
      break
  else:
    continue

h1 = C[S.index(1)]
h2 = 0
h3 = 0
if int(2) in S:
  h2 = C[S.index(2)]

if int(3) in S: 
  h3 = C[S.index(3)]
  
print(100*h1 + 10*h2 + h3)

Fixed submission:
n,m=map(int,input().split())
data=[-1]*n
for i in range(m):
  s,c=map(int,input().split())
  if (s==1 and c==0) and n>=2:
    print(-1)
    exit()
  if data[s-1]==-1 or data[s-1]==c:
    data[s-1]=c
  elif data[s-1]!=-1 and data[s-1]!=c:
    print(-1)
    exit()
  
if data[0]==-1 and n!=1:
  data[0]=1
elif data[0]==-1 and n==1:
  data[0]=0
for i in range(1,n):
  if data[i]==-1:
    data[i]=0
print(*data,sep='')
Buggy python submission (verdict: Runtime Error):
print(input(A,B,C))

if A==B and A/=C:
  print('Yes')
elif A==C and A/=B:
  print('Yes')
elif B==C and A/=B:
  print('Yes')
else:
  print('No')
  

Fixed submission:
a, b, c = map(int, input().split())

if a == b and a == c:
  print('No')
elif a != b and a != c and b!= c:
  print('No')
else:
  print('Yes')