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

ans = [1] * (n-k+1)

for i in range(k):
    ans[0] *= a[i]

for i in range(1, n-k+1):
    ans[i] = (ans[i-1] / a[i-1]) * a[k+i-1]
    if ans[i-1] < ans[i]:
        print('Yes')
    else:
        print('No')


Fixed submission:
n, k = map(int, input().split())
a = [int(i) for i in input().split()]

for i in range(n-k):
    if a[i] < a[k+i]:
        print('Yes')
    else:
        print('No')

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

ans = [1] * (n-k+1)

for i in range(k):
    ans[0] *= a[i]
for i in range(1, n-k+1):
    ans[i] = (ans[i-1] / a[i-1]) * a[k+i-1]

for i in range(len(ans)-1):
    if ans[i] < ans[i+1]:
        print('Yes')
    else:
        print('No')

Fixed submission:
n, k = map(int, input().split())
a = [int(i) for i in input().split()]

for i in range(n-k):
    if a[i] < a[k+i]:
        print('Yes')
    else:
        print('No')

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

ans = [0] * (n-k+1)

for i in range(n-k+1):
    for j in range(k):
        if j == 0:
            ans[i] = a[i+j]
        else:
            ans[i] *= a[i+j]

for i in range(len(ans)-1):
    if ans[i] < ans[i+1]:
        print('Yes')
    else:
        print('No')

Fixed submission:
n, k = map(int, input().split())
a = [int(i) for i in input().split()]

for i in range(n-k):
    if a[i] < a[k+i]:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
h, w = map(int, input().split())
board = [[i for i in input()] for _ in range(w)]

def check(i, j):
    if (j-1 >= 0):
        if(board[i][j-1] == "#"):
            return False
    if (j+1 < w):
        if(board[i][j+1] == "#"):
            return False
    if (i-1 >= 0):
        if(board[i-1][j] == "#"):
            return False
    if (i+1 < h):
        if(board[i+1][j] == "#"):
            return False

    return True

def main():
    for i in range(h):
        for j in range(w):
            if (board[i][j] == "#"):
                if(check(i,j)):
                    return "No"

    return "Yes"

if __name__ == '__main__':
    print(main())

Fixed submission:
h, w = map(int, input().split())
board = [[i for i in input()] for _ in range(h)]

def check(i, j):
    if (j-1 >= 0):
        if(board[i][j-1] == "#"):
            return False
    if (j+1 < w):
        if(board[i][j+1] == "#"):
            return False
    if (i-1 >= 0):
        if(board[i-1][j] == "#"):
            return False
    if (i+1 < h):
        if(board[i+1][j] == "#"):
            return False

    return True

def main():
    for i in range(h):
        for j in range(w):
            if (board[i][j] == "#"):
                if(check(i,j)):
                    return "No"

    return "Yes"

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Runtime Error):
import copy

h, w = map(int, input().split())
board = [[i for i in input()] for _ in range(w)]
c = copy.deepcopy(board)

def check(i, j):
    if (j-1 >= 0):
        if(c[i][j-1] == "#"):
            return False
    if (j+1 < w):
        if(c[i][j+1] == "#"):
            return False
    if (i-1 >= 0):
        if(c[i-1][j] == "#"):
            return False
    if (i+1 < h):
        if(c[i+1][j] == "#"):
            return False

    return True

def main():
    for i in range(h):
        for j in range(w):
            if (board[i][j] == "#"):
                if(check(i,j)):
                    return "No"

    return "Yes"

if __name__ == '__main__':
    print(main())

Fixed submission:
h, w = map(int, input().split())
board = [[i for i in input()] for _ in range(h)]

def check(i, j):
    if (j-1 >= 0):
        if(board[i][j-1] == "#"):
            return False
    if (j+1 < w):
        if(board[i][j+1] == "#"):
            return False
    if (i-1 >= 0):
        if(board[i-1][j] == "#"):
            return False
    if (i+1 < h):
        if(board[i+1][j] == "#"):
            return False

    return True

def main():
    for i in range(h):
        for j in range(w):
            if (board[i][j] == "#"):
                if(check(i,j)):
                    return "No"

    return "Yes"

if __name__ == '__main__':
    print(main())
Buggy python submission (verdict: Runtime Error):
N, K=map(int,input().split())
scores=input().split()
for i in range(N):
  scores[i]=int(scores[i])
new=K
old=0
for new<N:
  if scores[new]>scores[old]:
    print("Yes")
  else:
    print("No")
  new+=1
  old+=1

Fixed submission:
N, K=map(int,input().split())
scores=input().split()
for i in range(N):
  scores[i]=int(scores[i])
new=K
old=0
while new<N:
  if scores[new]>scores[old]:
    print("Yes")
  else:
    print("No")
  new+=1
  old+=1

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
A = list(map(int,input().split()))
S = 1
for j in range(K):
  S = S * A[j]
for i in range(K,N):
  T = (S // A[i-K])*A[i]
  if S < T:
    print("Yes")
  else:
    print("No")
  S = T

          

Fixed submission:
N,K = map(int,input().split())
A = list(map(int,input().split()))
for i in range(K,N):
    if A[i-K] < A[i]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
from math import sqrt
N = int(input())

for i in range(1,N+1):
    n = int(sqrt(i))
    ans = 0
    for x in range(1,n+1):
        if 6*x*x == i:
            ans +=1
    m = int(sqrt(i/3))
    for x in range(1,m+1):
        for y in range(1,n+1):
            if x!=y:
                if 3*x*x + y*y + 2*x*y == i:
                    ans +=3
    l = int(sqrt(i/6))
    for x in range(1,l+1):
        for y in range(1,x):
            for z in range(1,y):
                if (x+y+z)**2 - x*y - x*z - y*z == i:
                    ans +=6
    print(ans)

Fixed submission:
from math import sqrt
N = int(input())
L = [0 for _ in range(N)]
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            a = x**2 + y**2 + z**2 + x*y + x*z + y*z
            if a >=1 and a <= N:
                L[a-1] +=1
for x in L:
    print(x)
Buggy python submission (verdict: Runtime Error):
N = int(input())
alphabet = [chr(i) for i in range(97, 97+26)]

n = 1
s = 26
for i in range(1,12):
    if N <= s:
        n = i
        break
    else:
        s += 26**(i+1)
        
s = 0
for i in range(1,n):
    s += 26**i
    
N = N - s - 1
if N == 0:
    Ans = ""
    for _ in range(n):
        Ans += "a"
else:
    while N > 0:
        L.append(N%26)
        N = N//26
    
    Ans = ""
    for x in reversed(L):
        Ans += alphabet[x]
print(Ans)

Fixed submission:
N = int(input())
alphabet = [chr(i) for i in range(97, 97+26)]

n = 1
s = 26
for i in range(1,12):
    if N <= s:
        n = i
        break
    else:
        s += 26**(i+1)
        
s = 0
for i in range(1,n):
    s += 26**i
    
N = N - s - 1
if N == 0:
    Ans = ""
    for _ in range(n):
        Ans += "a"
else:
    L = [0 for _ in range(n)]
    i = 1
    while N > 0:
        L[-i] = N%26
        N = N//26
        i +=1
    
    Ans = ""
    for x in L:
        Ans += alphabet[x]
print(Ans)
Buggy python submission (verdict: Runtime Error):
H1,M1,H2,H2,K = map(int,input().split())
print((H2-H1)*60+(M2-M1)-K)

Fixed submission:
H1,M1,H2,M2,K = map(int,input().split())
print((H2-H1)*60+(M2-M1)-K)
Buggy python submission (verdict: Runtime Error):
import math

A,B,H,M = map(int,input().split())

x = 360//12
y = 360//60

a = M*y
b = (H+M/60)*x
T = 1
if a>=b:
  if a-b>180:
    k = 360 - a+b
  elif a - b == 180:
    print(A+B)
    T = 0
  else:
    k = a-b
else:
  if b-a>180:
    k = 360 - b+a
  elif b-a == 180:
    print(A+B)
    T = 0
  else:
    k = b-a
if T = 1:
  k = math.radians(k)

  ans = A*A + B*B - 2*A*B*math.cos(k)

  print(math.sqrt(ans))

Fixed submission:
import math

A,B,H,M = map(int,input().split())

x = 360//12
y = 360//60

a = M*y
b = (H+M/60)*x
T = 1
if a>=b:
  if a-b>180:
    k = 360 - a+b
  elif a - b == 180:
    print(A+B)
    T = 0
  else:
    k = a-b
else:
  if b-a>180:
    k = 360 - b+a
  elif b-a == 180:
    print(A+B)
    T = 0
  else:
    k = b-a

if T == 1:
  k = math.radians(k)

  ans = A*A + B*B - 2*A*B*math.cos(k)

  print(math.sqrt(ans))

Buggy python submission (verdict: Runtime Error):
import math

A,B,H,M = map(int,input().split())

x = 360//12
y = 360//60

a = M*y
b = (H+ M/60)*x

if a>=b:
  if a-b>180:
    k = 360 - a+b
  elif a - b == 180:
    print(A+B)
  else:
    k = a-b
else:
  if b-a>180:
    k = 360 - b+a
  elif b-a == 180:
    print(A+B)
  else:
    k = b-a
    
k = math.radians(k)

ans = A*A + B*B - 2*A*B*math.cos(k)

print(math.sqrt(ans))

Fixed submission:
import math

A,B,H,M = map(int,input().split())

x = 360//12
y = 360//60

a = M*y
b = (H+M/60)*x
T = 1
if a>=b:
  if a-b>180:
    k = 360 - a+b
  elif a - b == 180:
    print(A+B)
    T = 0
  else:
    k = a-b
else:
  if b-a>180:
    k = 360 - b+a
  elif b-a == 180:
    print(A+B)
    T = 0
  else:
    k = b-a

if T == 1:
  k = math.radians(k)

  ans = A*A + B*B - 2*A*B*math.cos(k)

  print(math.sqrt(ans))

Buggy python submission (verdict: Runtime Error):
import math

A,B,H,M = map(int,input().split())

x = 360//12
y = 360//60

a = M*y
b = (H+ M/60)*x

if a>=b:
  if a-b>180:
    k = 360 - a+b
  elif a - b == 180:
    print(A+B)
  else:
    k = a-b
else:
  if b-a>1800:
    k = 360 - b+a
  elif b-a == 180:
    print(A+B)
  else:
    k = b-a
    
k = math.radians(k)

ans = A*A + B*B - 2*A*B*math.cos(k)

print(math.sqrt(ans))

Fixed submission:
import math

A,B,H,M = map(int,input().split())

x = 360//12
y = 360//60

a = M*y
b = (H+M/60)*x
T = 1
if a>=b:
  if a-b>180:
    k = 360 - a+b
  elif a - b == 180:
    print(A+B)
    T = 0
  else:
    k = a-b
else:
  if b-a>180:
    k = 360 - b+a
  elif b-a == 180:
    print(A+B)
    T = 0
  else:
    k = b-a

if T == 1:
  k = math.radians(k)

  ans = A*A + B*B - 2*A*B*math.cos(k)

  print(math.sqrt(ans))
Buggy python submission (verdict: Time Limit Exceeded):
import math
X = int(input())
N = math.floor(X ** (1/2)) + 1

for a in range(N):
  for b in range(-N,N):
    x = a**5
    y = b**5
    T = 0
    if x-y == X:
      print(a,b)
      T = 1
      break
  if T == 1:
    break

Fixed submission:
import math
X = int(input())
N = math.floor(X ** (2/5)) + 1

for a in range(N):
  for b in range(-N,N):
    x = a**5
    y = b**5
    T = 0
    if x-y == X:
      print(a,b)
      T = 1
      break
  if T == 1:
    break
Buggy python submission (verdict: Runtime Error):
import math
K = int(input())
s = 0
for a in range(1,K+1):
  for b in range(1,K+1):
    x = math.gcd(a,b)
    for c in range(1,K+1):
      s += gcd(x,c)
print(s)

Fixed submission:
import math
K =int(input())
L = [0 for _ in range(K)]
for a in range(1,K+1):
  for b in range(1,K+1):
    L[math.gcd(a,b)-1] +=1
s = 0
for c in range(1,K+1):
    for k in range(K):
        for _ in range(L[k]):
            s += math.gcd(c,k+1)
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Q = int(input())

c = 0
R = ""
L = ""
for _ in range(Q):
    T = input().split()
    if len(T) == 1:
        c +=1
        L_d = L
        L = "".join(list(reversed(R)))
        R = "".join(list(reversed(L_d)))
    else:
        if T[1] == "1":
            L = T[2] + L
        else:
            R = R + T[2]
if c % 2 == 0:
    print(L + S + R)
else:
    print(L + "".join(list(reversed(S))) + R)

Fixed submission:
S = input()
Q = int(input())

c = 0
R = ""
L = ""
for _ in range(Q):
    T = input().split()
    if len(T) == 1:
        c +=1
    else:
        if T[1] == "1":
            if c % 2 == 0:
                L = T[2] + L
            else:
                R = R + T[2]
        else:
            if c % 2 == 0:
                R = R + T[2]
            else:
                L = T[2] + L
if c % 2 == 0:
    print(L + S + R)
else:
    print("".join(list(reversed(L+S+R))))

Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Q = int(input())

for i in range(Q):
    T = input().split()
    if len(T) == 1:
        S = "".join(list(reversed(S)))
    else:
        if T[1] == "1":
            S = T[2] + S
        else:
            S = S + T[2]
print(S)

Fixed submission:
S = input()
Q = int(input())

c = 0
R = ""
L = ""
for _ in range(Q):
    T = input().split()
    if len(T) == 1:
        c +=1
    else:
        if T[1] == "1":
            if c % 2 == 0:
                L = T[2] + L
            else:
                R = R + T[2]
        else:
            if c % 2 == 0:
                R = R + T[2]
            else:
                L = T[2] + L
if c % 2 == 0:
    print(L + S + R)
else:
    print("".join(list(reversed(L+S+R))))
Buggy python submission (verdict: Runtime Error):
N = int(input())
X = input().split()
X = [int(l) for l in X]

s = 0
for x in X:
    s += (x-1)**2

S = s

if N == 1:
    print(0)
else:
    m = max(X)
    n = min(X)
    for P in range(n,m+1):
        s = 0
        for x in X:
            s += (x-P)**2
        if s < S:
            S = s
	print(S)

Fixed submission:
N = int(input())
X = input().split()
X = [int(l) for l in X]

s = 0
for x in X:
    s += (x-X[0])**2
S = s

if N == 1:
    print(S)
else:
    m = max(X)
    n = min(X)
    for P in range(n,m+1):
        s = 0
        for x in X:
            s += (x-P)**2
        if s < S:
            S = s
    print(S)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = [input() for i in range(N)]

S = sorted(S)

v = S[0]
c = 0
for i in range(N):
    if v == S[i]:
        c +=1
    else:
        break
del S[0:c]
N = N -c
L = [[v,c]]

while S != []:
    v = S[0]
    c = 0
    for i in range(N):
        if v == S[i]:
            c +=1
        else:
            break
    del S[0:c]
    N = N-c
    if L[0][1] == c:
        L.append([v,c])
    elif L[0][1] < c:
        L = [[v,c]]

for l in L:
    print(l[0])

Fixed submission:
N = int(input())

L = {}

for i in range(N):
    s = input()
    if s in L.keys():
        L[s] +=1
    else:
        L[s] = 1

L = sorted(L.items(),key=lambda x:x[1],reverse=True)

S = []
c = L[0][1]
for i in range(len(L)):
    if c == L[i][1]:
        S.append(L[i][0])
    else:
        break
S = sorted(S)
for s in S:
    print(s)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = [input() for i in range(N)]

S = sorted(S)

v = S[0]
c = S.count(v)
del S[0:c]
L = [[v,c]]

while S != []:
    v = S[0]
    c = S.count(v)
    del S[0:c]
    if L[0][1] == c:
        L.append([v,c])
    elif L[0][1] < c:
        L = [[v,c]]

for l in L:
    print(l[0])

Fixed submission:
N = int(input())

L = {}

for i in range(N):
    s = input()
    if s in L.keys():
        L[s] +=1
    else:
        L[s] = 1

L = sorted(L.items(),key=lambda x:x[1],reverse=True)

S = []
c = L[0][1]
for i in range(len(L)):
    if c == L[i][1]:
        S.append(L[i][0])
    else:
        break
S = sorted(S)
for s in S:
    print(s)
Buggy python submission (verdict: Time Limit Exceeded):
x = input().split()
N = int(x[0])
K = int(x[1])
H = input().split()
H = [int(l) for l in H]

if N <= K:
    print(0)
else:
    for i in range(K):
        m = max(H)
        H.remove(m)
    print(sum(H))

Fixed submission:
x = input().split()
N = int(x[0])
K = int(x[1])
H = input().split()
H = [int(l) for l in H]

if N <= K:
    print(0)
else:
    H = sorted(H,reverse=True)
    print(sum(H[K:]))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
X = []

for i in range(1,10):
    a = []
    for j in range(1,10):
        c = 0
        for k in range(1,N+1):
            if (str(k)[0] == str(i))&(str(k)[-1] == str(j)):
                c +=1
        a.append(c)
    X.append(a)
    
ans = 0

for i in range(9):
    for j in range(9):
        ans += X[i][j]*X[j][i]
print(ans)

Fixed submission:
N = int(input())
X = [[0 for j in range(10)] for i in range(10)]

for k in range(1,N+1):
    X[int(str(k)[0])][int(str(k)[-1])] +=1

Ans = 0
for i in range(10):
    for j in range(10):
        Ans += X[i][j]*X[j][i]
print(Ans)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
a = [int(input()) for _ in range(M)]

T = 1
for i in range(M-1):
    if a[i]+1==a[i+1]:
        T = 0
        break
if T == 0:
    print(0)
else:
    if N==1:
        print(1)
    elif N == 2:
        print(2)
    else:
        L = [0 for _ in range(N)]
        if 0 in a:
            L[0] = 0
            L[1] = 1 
        else:
            L[0] = 1
            if 1 in a:
                L[1] = 0
            else:
                L[1] = 2
        for i in range(2,N):
            S = i-2 in a
            T = i-1 in a
            U = i in a
            if U:
                L[i] = 0
            elif T:
                L[i] = L[i-2]%1000000007
            else:
                if S:
                    L[i] = L[i-1]%1000000007
                else:
                    L[i] = (L[i-1]+L[i-2])%1000000007
    print(L[-1])

Fixed submission:
N,M = map(int,input().split())

a = [int(input())-1 for _ in range(M)]
T = 1
for i in range(M-1):
    if a[i]+1 == a[i+1]:
        T = 0
        break
if T == 0:
    print(0)
else:
    if N == 1:
        if M==0:
            print(1)
        else:
            print(0)
    else:
        L = [0 for _ in range(N)]
        for i in range(M):
            L[a[i]] = -1
        if L[0] == -1:
            L[1] = 1
        else:
            L[0] = 1
            if L[1] != -1:
                L[1] = 2
        for i in range(2,N):
            if L[i] != -1:
                if L[i-2] == -1:
                    L[i] = L[i-1]%1000000007
                elif L[i-1] == -1:
                    L[i] = L[i-2]%1000000007
                else:
                    L[i] = (L[i-1]+L[i-2])%1000000007
        print(L[-1])
Buggy python submission (verdict: Runtime Error):
N = input()

if len(N)<=3:
  print("ABC")
else:
  print("ABD)


Fixed submission:
N = input()

if len(N)<=3:
  print("ABC")
else:
  print("ABD")
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
l = [int(x) for x in input().split()]

x = 1
ll = [1]
for i in l:
    x *= i
    ll.append(x)

for i in range(n-k):
    if ll[k+i]/ll[i] < ll[k+i+1]/ll[i+1]:
        print("Yes")
    else:
        print("No")


Fixed submission:
n, k = map(int, input().split())
l = [int(x) for x in input().split()]

for i in range(n-k):
    if l[i] < l[k+i]:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
import copy

n, k = map(int, input().split())
l = [int(x) for x in input().split()]

x = 1
ll = []
for i in l:
    x *= i
    ll.append(x)

lll = [copy.deepcopy(ll[k-1])]
for i in range(n-k):
    lll.append(int(ll[i+k]/ll[i]))

for i in range(len(lll)-1):
    if lll[i] < lll[i+1]:
        print("Yes")
    else:
        print("No")


Fixed submission:
n, k = map(int, input().split())
l = [int(x) for x in input().split()]

for i in range(n-k):
    if l[i] < l[k+i]:
        print("Yes")
    else:
        print("No")

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

x = 1
for i in range(k):
    x *= l[i]

xx = x
for i in range(n-k):
    xx *= l[i+k] / l[i]
    if xx > x:
        print("Yes")
    else:
        print("No")
    x = xx


Fixed submission:
n, k = map(int, input().split())
l = [int(x) for x in input().split()]

for i in range(n-k):
    if l[i] < l[k+i]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
import sys

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

ans = 1

for i in l:
  a *= i
  if a > 1000000000000000000:
    print(-1)
    sys.exit()
print(ans)

Fixed submission:
import sys

n = int(input())
l = [int(x) for x in input().split()]

ans = 1

if 0 in l:
    print(0)
    sys.exit()

for i in l:
  ans *= i
  if ans > 1000000000000000000:
    print(-1)
    sys.exit()
print(ans)

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

ans = 1
for i in l:
  ans *= i
  
if ans > 1000000000000000000:
  print(-1)
else:
  print(ans)

Fixed submission:
import sys

n = int(input())
l = [int(x) for x in input().split()]

ans = 1

if 0 in l:
    print(0)
    sys.exit()

for i in l:
  ans *= i
  if ans > 1000000000000000000:
    print(-1)
    sys.exit()
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy

s = input().split()
a, b, c = int(s[0]), int(s[1]), int(s[2])

if 4*a*b - (c - a - b) ** 2 < 0:
    print("Yes")
    # print("{}, {}".format(4*a*b, (c - a - b) ** 2))
else:
    print("No")
    # print("{}, {}".format(4*a*b, (c - a - b) ** 2))
    # 249999999 250000000 999999998


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

if 4*a*b - (c - a - b) ** 2 < 0 and c-a-b > 0:
    print("Yes")
    # print("{}, {}".format(4*a*b, (c - a - b) ** 2))
else:
    print("No")
    # print("{}, {}".format(4*a*b, (c - a - b) ** 2))
    # 249999999 250000000 999999998

Buggy python submission (verdict: Runtime Error):
import numpy

s = input().split()
a, b, c = int(s[0]), int(s[1]), int(s[2])

k = max(float(a), float(b))
if float(a) + float(b) - float(c) + 2.0 * numpy.sqrt(a*k * b*k) / k < 0.0:
    print("Yes")
    # print("{} {} {}".format(numpy.sqrt(a), numpy.sqrt(b), numpy.sqrt(c)))
else:
    print("No")
    # print("{} {} {}".format(numpy.sqrt(a), numpy.sqrt(b), numpy.sqrt(c)))


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

if 4*a*b - (c - a - b) ** 2 < 0 and c-a-b > 0:
    print("Yes")
    # print("{}, {}".format(4*a*b, (c - a - b) ** 2))
else:
    print("No")
    # print("{}, {}".format(4*a*b, (c - a - b) ** 2))
    # 249999999 250000000 999999998
Buggy python submission (verdict: Runtime Error):
s = input()

if s == "AAA" or s -- "BBB":
    print("No")
else:
    print("Yes")

Fixed submission:
s = input()

if s == "AAA" or s == "BBB":
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = map(int, input().split())

ans = 0
while n > 0:
    if n >= a:
        ans += a
        n -= a
    else:
        ans += n
        break
    n -= b

print(ans)

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

ans = int(n/(a+b)) * a

if n%(a+b) <= a:
    ans += n%(a+b)
else:
    ans += a

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())

for i in range(q):
  st = input().split()
  if int(st[0]) == 1:
    s = s[::-1]
  else:
    if int(st[1]) == 1:
      s = st[2] + s
    else:
      s = s + st[2]

print(s)

Fixed submission:
from collections import deque
s = deque(input())
q = int(input())

flag = 1
for i in range(q):
  st = input().split()
  if int(st[0]) == 1:
    flag *= -1
  else:
    tmp = int(st[1])*flag
    if tmp == 1 or tmp == -2:
      s.appendleft(st[2])
    else:
      s.append(st[2])

if flag == -1:
  s.reverse()
print(''.join(s))

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())

for i in range(q):
  st = input().split()
  if int(st[0]) == 1:
    s = s[::-1]
  else:
    if int(st[1]) == 1:
      s = st[2] + s
    else:
      s = s + st[2]

print(s)

Fixed submission:
from collections import deque
s = deque(input())
q = int(input())

flag = 1
for i in range(q):
  st = input().split()
  if int(st[0]) == 1:
    flag *= -1
  else:
    tmp = int(st[1])*flag
    if tmp == 1 or tmp == -2:
      s.appendleft(st[2])
    else:
      s.append(st[2])

if flag == -1:
  s.reverse()
print(''.join(s))
Buggy python submission (verdict: Runtime Error):
import fractions

s = input().split()
n, k = int(s[0]), int(s[1])

ans = int(fractions.log(n, k) + 1.0)
print(ans)

Fixed submission:
import math
 
s = input().split()
n, k = int(s[0]), int(s[1])
 
ans = int(math.log(n, k) + 1.0)
print(ans)