qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a = [int(input()) for i in range(10)]

a.reverse()
print(a[0])
print(a[1])
print(a[2])


Fixed code:
a = [int(input()) for i in range(10)]
a.sort(reverse=True)
print(a[0])
print(a[1])
print(a[2])
Buggy code:
a = []
for i in range(10):
    a.append(input())
a = a.sort(reverse=True)
for i in range(3):
    print(i)

Fixed code:
a = [int(input()) for i in range(10)]

a.sort(reverse=True)

for i in range(3):
    print(a[i])
Buggy code:
a = []
for i in range(10):
    a.append(int(input()))
a.sort
print(a[9])
print(a[8])
print(a[7])

Fixed code:
m = []
for i in range(10):
  m.append(int(input()))
m.sort()
print(m[9])
print(m[8])
print(m[7])
Buggy code:
height = []
for i in range(10):
    height.append(int(input()))
height.sort()
for i in range(3):
    print(height[i])

Fixed code:
height = []
for i in range(10):
     height.append(int(input()))

height.sort()

for i in range(3):
     print(height[-1-i])
Buggy code:
list = []
for i in range(10):
    list.append(input())
 
list.sort(reverse = True)
for i in range(3):
    print(int(list[i]))

Fixed code:
input_arr = []
for i in range(10):
    input_arr.append(int(input()))

input_arr.sort(reverse=True)

for i in range(3):
    print(input_arr[i])
Buggy code:
h = []
for i in range(10):
	h.append(input())
h.sort(reverse=True)
for i in range(3):
	print(h[i])

Fixed code:
h=[int(input()) for i in range(10)]
h.sort(reverse=True)
for i in h[:3]:
    print(i)
Buggy code:
N = int(input())

a = []
for i in range(N):
    a.append(input())

a.sort()

for i in range(3):
    print(a[i])


Fixed code:
N=10
a=[]
for i in range(N):
	a.append(int(input()))

a.sort()
for i in range(3):
	print(a.pop())
Buggy code:
list=[]
for i in range(10):
   list.append(input())
list.sort(reverse=true)
for i in range(3):
   print list[i]   

Fixed code:
list=[]
for i in range(10):
    list.append(int(input()))
list.sort()
list.reverse()
for i in range(3):
    print(list[i])
Buggy code:
High = []
for i in range(10):
    High.append(input())
High.sort(reverse = True)

for i in range(3):
    print(High[i])

Fixed code:
High = [int(input()) for i in range(10)]
High.sort(reverse=True)
for i in range(3):
    print(High[i])
Buggy code:
n=int(input())
for i in range(n):
    a,b,c = input().split()
    x = int(a)
    y = int(b)
    z = int(c)
    p = [a,b,c]
    p.sort()
    if pow(p[0],2) + pow(p[1],2) == pow(p[2],2):
        print('YES')
    else:
        print('NO')


Fixed code:
n=int(input())
for i in range(n):
    a,b,c = input().split()
    x = int(a)
    y = int(b)
    z = int(c)
    p = [x,y,z]
    p.sort()
    if pow(p[0],2) + pow(p[1],2) == pow(p[2],2):
        print('YES')
    else:
        print('NO')
Buggy code:
tri_list = []
n =  int(input())
for i in range(n):
    #tri_list = list(map(int,input().split(" ")))
    k = int(input())
    tri_list = list(k.split(" "))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")


Fixed code:
n =  int(input())
for i in range(n):
    tri_list = list(map(int,input().split(" ")))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")
Buggy code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

n = int(input())

for i in range(n):
    x = list(map(int, input().split()))
    x.sort()
    if x[0]**2 + x[1]**2 == x[2]**2:
        print('Yes')
    else:
        print('No')

Fixed code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

n = int(input())

for i in range(n):
    x = list(map(int, input().split()))
    x.sort()
    if x[0]**2 + x[1]**2 == x[2]**2:
        print('YES')
    else:
        print('NO')
Buggy code:
for i in range(int(input())):
    a = sorted(map(int,input().split()),reversed = True)
    if a[0]**2 == a[1]**2 + a[2]**2:
        print("YES")
    else:
        print("NO")
    

Fixed code:
for i in range(int(input())):
    a = sorted(map(int,input().split()),reverse = True)
    if a[0]**2 == a[1]**2 + a[2]**2:
        print("YES")
    else:
        print("NO")
Buggy code:
N=int(input())
for n in range(N):
	sides = list(map(int,input().split()))
	sides.sort()
	if sides[-1] < sides[-2]+sides[-3]:
		print("YES")
	else:
		print("NO")

Fixed code:
N=int(input())
for n in range(N):
	sides = list(map(int,input().split()))
	sides.sort()
	if sides[-1]**2 == sides[-2]**2 + sides[-3]**2:
		print("YES")
	else:
		print("NO")
Buggy code:
#coding:UTF-8
def Rec(N,List):
    for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO")
if __name__=="__main__":
    List=[]
    N=int(input())
    for i in range(N):
        List.append(input())
    Rec(N,List

Fixed code:
#coding:UTF-8
def Rec(N,List):
    for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO")

if __name__=="__main__":
    List=[]
    N=int(input())
    for i in range(N):
        List.append(input())
    Rec(N,List)
Buggy code:
N = int(raw_input())

for i in range(N):
    line = raw_input()
    a, b, c = sorted(int(w) for w in line.split())

    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')

Fixed code:
N = int(input())

for i in range(N):
    line = input()
    a, b, c = sorted(int(w) for w in line.split())

    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')
Buggy code:
[ print(["YES", "NO"][0 if d[0] ** 2 + d[1] ** 2 == d[2] ** 2 else 1]) for i,d in enumerate([sorted([int(x) ** 2 for x in input().split()])]) for _ in range(int(input()))]

Fixed code:
[print(["YES", "NO"][0 if i[0] + i[1] == i[2] else 1]) for _ in range(int(input())) for i in [sorted([int(x) ** 2 for x in input().split()])] ]
Buggy code:
[ print(["YES", "NO"][0 if i[0] ** 2 + i[1] ** 2 == i[2] ** 2 else 1]) for i in [sorted([int(x) ** 2 for x in input().split()])] for _ in range(int(input()))]

Fixed code:
[print("YES" if i[0] + i[1] == i[2] else "NO") for _ in range(int(input())) for i in [sorted([int(x) ** 2 for x in input().split()])]]
Buggy code:
def is_triangle(x, y, z):
    x, y, z = sorted(x, y, z)
    return x**2 + y**2 == z**2

num = int(input())
for i in range(num):
    x, y, z = map(int, input().split())
    triangle = is_triangle(x, y, z)
    if triangle:
        print('YES')
    else:
        print('NO')
        

Fixed code:
def is_triangle(x, y, z):
    x, y, z = sorted([x, y, z])
    return x**2 + y**2 == z**2

num = int(input())
for i in range(num):
    x, y, z = map(int, input().split())
    triangle = is_triangle(x, y, z)
    if triangle:
        print('YES')
    else:
        print('NO')
Buggy code:
import sys

n = int(sys.stdin.readline().strip())
print(n)
for i in range(n):
    line = sys.stdin.readline()
    lengths = sorted(list(map(int, line.strip().split())))
    if lengths[0]**2 + lengths[1]**2 == lengths[2]**2:
        print('YES')
    else:
        print('NO')

Fixed code:
import sys

n = int(sys.stdin.readline().strip())
for i in range(n):
    line = sys.stdin.readline()
    lengths = sorted(list(map(int, line.strip().split())))
    if lengths[0]**2 + lengths[1]**2 == lengths[2]**2:
        print('YES')
    else:
        print('NO')
Buggy code:
input()
l =input().split()
a=[int(l[i]) for i in range(3)]
a=sorted(a)
if a[0]**2+a[1]**2==a[2]**2:
    print("YES")
else:
    print("NO")

Fixed code:
n=int(input())
for j in range(n):
    l =input().split()
    a=[int(l[i]) for i in range(3)]
    a=sorted(a)
    if a[0]**2+a[1]**2==a[2]**2:
        print("YES")
    else:
        print("NO")
Buggy code:
N = int(input())

for i in range(N):
	sides = map(int, input().split())
	longestSide = max(sides)
	sides.remove(longestSide)
	if (longestSide ** 2) == (sides[0] ** 2 + sides[1] ** 2):
		print('YES')
	else:
		print('NO')

Fixed code:
N = int(input())

for i in range(N):
	sides = list(map(int, input().split()))
	longestSide = max(sides)
	sides.remove(longestSide)
	if (longestSide ** 2) == (sides[0] ** 2 + sides[1] ** 2):
		print('YES')
	else:
		print('NO')
Buggy code:
for i in range(0, int(input())):
    sidelen = [int(j) for j in input().split(" ")]
    sidelen.sort(reverse=True)
    if(sidelen[0]**2 == sidelen[1]**2+sidelen[2]**2):
        print("TES")
    else:
        print("NO")

Fixed code:
for i in range(0, int(input())):
    sidelen = [int(j) for j in input().split(" ")]
    sidelen.sort(reverse=True)
    if(sidelen[0]**2 == sidelen[1]**2 + sidelen[2]**2):
        print("YES")
    else:
        print("NO")
Buggy code:
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= k.sorted()
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')

Fixed code:
for _ in range(int(input())):
    x = list(sorted(map(int, input().split())))
    print("YES" if x[0]**2 + x[1]**2 == x[2]**2 else "NO")
Buggy code:
N = int(input())
for i in range(N):
	line = raw_input()
	l = [None]*3
	l[0] = int(line.split()[0])
	l[1] = int(line.split()[1])
	l[2] = int(line.split()[2])
	l.sort()
	if l[0]**2+l[1]**2==l[2]**2:
		print("YES")
	else:
		print("NO")

Fixed code:
N = int(input())
for i in range(N):
	line = input()
	l = [None]*3
	l[0] = int(line.split()[0])
	l[1] = int(line.split()[1])
	l[2] = int(line.split()[2])
	l.sort()
	if l[0]**2+l[1]**2==l[2]**2:
		print("YES")
	else:
		print("NO")
Buggy code:
# usr/bin/python
# coding: utf-8
################################################################################
# Is it a Right Triangle?
# Write a program which judges wheather given length of three side form a right triangle.
# Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
#
# Input
# Input consists of several data sets. In the first line, the number of data set,
# N is given. Then, N lines follow, each line corresponds to a data set.
# A data set consists of three integers separated by a single space.
#
# Constraints
# 1 ??? length of the side ??? 1,000
# N ??? 1,000
# Output
# For each data set, print "YES" or "NO".
#
# Sample Input
# 3
# 4 3 5
# 4 3 6
# 8 8 8
# Output for the Sample Input
# YES
# NO
# NO
#
################################################################################

if __name__ == "__main__":
    line = input()
    a = int(line.split(" ")[0])
    b = int(line.split(" ")[1])
    c = int(line.split(" ")[2])
    if (a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a) :
        print("YES")
    else :
        print("NO")
    exit(0)

Fixed code:
# usr/bin/python
# coding: utf-8
################################################################################
# Is it a Right Triangle?
# Write a program which judges wheather given length of three side form a right triangle.
# Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
#
# Input
# Input consists of several data sets. In the first line, the number of data set,
# N is given. Then, N lines follow, each line corresponds to a data set.
# A data set consists of three integers separated by a single space.
#
# Constraints
# 1 ??? length of the side ??? 1,000
# N ??? 1,000
# Output
# For each data set, print "YES" or "NO".
#
# Sample Input
# 3
# 4 3 5
# 4 3 6
# 8 8 8
# Output for the Sample Input
# YES
# NO
# NO
#
################################################################################

if __name__ == "__main__":
    num = int(input())
    inputline = [""]*num
    for i in range(0,num):
        inputline[i] = input()
    for line in inputline:
        a = int(line.split(" ")[0])
        b = int(line.split(" ")[1])
        c = int(line.split(" ")[2])
        if (a*a+b*b == c*c or b*b+c*c == a*a or c*c+a*a == b*b):
            print("YES")
        else:
            print("NO")
Buggy code:
def ifTriangle(a, b, c):
    if a**2 + b**2 == c: print("YES")
    else: print("NO")

n=int(input())
for i in range(n):
    lines=list(map(int, input().split()))
    lines.sort()
    ifTriangle(lines[0], lines[1], lines[2])

    #ifTriangle(a, b, c)

Fixed code:
def ifTriangle(a, b, c):
    if (a**2) + (b**2) == c**2: print("YES")
    else: print("NO")

n=int(input())
for i in range(n):
    lines=list(map(int, input().split()))
    lines.sort()
    ifTriangle(lines[0], lines[1], lines[2])
Buggy code:
def main():
    n = int(input())
    for i in range(n):
        Array = list(map(int,input().split()))
        Array.sort()
        if Array[2]**2 == Array[0]**2 + Array[1]**2:
            print("YES")
        else:
            print("No")

if __name__ == '__main__':
    main()

Fixed code:
def main():
    n = int(input())
    for i in range(n):
        Array = list(map(int,input().split()))
        Array.sort()
        if Array[2]**2 == Array[0]**2 + Array[1]**2:
            print("YES")
        else:
            print("NO")

if __name__ == '__main__':
    main()
Buggy code:
n=int(input())
for i in range(n)
        s=input().split(" ")
        s=[int(j) for j in s]
        s.sort()
        
        if(s[0]**2+s[1]**2==s[2]**2):
            print("YES")

        else:
            print("NO")
        

  

Fixed code:
n = int(input())
for i in range(n):
  l = [int(j) for j in input().split()]
  l.sort()
  print("YES" if l[0]**2 + l[1]**2 == l[2]**2 else "NO")
Buggy code:
for _ in range(int(input())):
    l = list(map(int, input().split()))
    l.sort()
    print('YES' if l[0]**2 + l[1] ** 2 == l[2] ** 2 else 'No') 

Fixed code:
for _ in range(int(input())):
    l = list(map(int, input().split()))
    l.sort()
    print('YES' if l[0]**2 + l[1] ** 2 == l[2] ** 2 else 'NO')
Buggy code:
import sys
input()
for e in sys.stdin:
    a, b, c = sorted(int(e.split()))
    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')


Fixed code:
import sys
input()
for e in sys.stdin:
    a, b, c = sorted(map(int, e.split()))
    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')
Buggy code:
import sys
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin.readlines()):
 print(['NO','YES'][a*a+b*b==c*c])


Fixed code:
import sys
input()
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin):
 print(['NO','YES'][a*a+b*b==c*c])
Buggy code:
n = int(input())

for i in range(n):
    l = list(map(int, line.split()))
    l.sort()
    if l[0]**2 + l[1]**2 == l[3]**2: print("YES")
    else: print("NO")

Fixed code:
n=int(input())
for i in range(n):
	l=list(map(int,input().split()))
	l.sort()
	print("YES" if l[0]**2+l[1]**2==l[2]**2 else "NO")
Buggy code:
n = int(input()) 
for i in range(n):
   p = list(map(int,input().split()))
   p.sort()
   if p[0]*p[0] + p[1]*p[1] == p[2]*p[2]:
     print("YES")
   else
     print("NO")


Fixed code:
for i in range(int(input())):
    llist = list(map(int,input().split()))
    llist.sort()
    if(llist[2]**2 == llist[0]**2 + llist[1]**2):
        print('YES')
    else:
        print('NO')
Buggy code:
def judge(lists):
    lists.sort()
    if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True


def run():
    N = int(input())
    for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("Yes")
        else:
            print("NO")

if __name__ == '__main__':
    run()


Fixed code:
def judge(lists):
    lists.sort()
    if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True


def run():
    N = int(input())
    for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("YES")
        else:
            print("NO")

if __name__ == '__main__':
    run()
Buggy code:
def triangle(dataset):
    a, b, c = dataset
    if a*a + b*b == c*c:
        return 1
    return 0

N = int(input())
for _ in range(N):
    dataset = sorted(map(int, input().split()))
    flag = triangle(dataset)
    print("YES" * flag + "NO" * flag)

Fixed code:
def triangle(dataset):
    a, b, c = dataset
    if a*a + b*b == c*c:
        return 1
    return 0

N = int(input())
for _ in range(N):
    dataset = sorted(map(int, input().split()))
    flag = triangle(dataset)
    print(["NO", "YES"][flag])
Buggy code:
N = int(input()) 
for i in range(N) :
   p = list(map(int,input().split()))
   p.sort()
   if p[0]*p[0] + p[1]*p[1] == p[2]*p[2]:
     print("YES")
   else
     print("NO")


Fixed code:
N = input()

for i in range(int(N)):
    l = list(map(int, input().split()))
    l.sort()
    if(l[2] == (l[0]**2+l[1]**2)**0.5):
        print("YES")
    else:
        print("NO")
Buggy code:
for i in range(int(input())):
    a,b,c=map(int,raw_input().split())
    if a**2+b**2==c**2:print("YES")
    else:print("NO")

Fixed code:
for i in range(int(input())):
    a,b,c=map(int,input().split())
    if a**2+b**2==c**2:
        print("YES")
    elif b**2+c**2==a**2:
        print("YES")
    elif c**2+a**2==b**2:
        print("YES")
    else:
        print("NO")
Buggy code:
n=input()
for i in range(0,n):
????????num=map(int, input().split())
????????num.sort()
????????a=num[0]
????????b=num[1]
????????c=num[2]
????????if c*c==a*a+b*b:
????????????????print ("YES")
????????else:
????????????????print ("NO")

Fixed code:
n=int(input())
for i in range(n):
    a,b,c=map(int,input().split())
    x=[a,b,c]
    x.sort()
    if x[2]**2==x[1]**2+x[0]**2:
        print("YES")
    else :
        print("NO")
Buggy code:
n = input()
for i in range(0, n):
    a,b,c = map(int, input().split())
    if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
        print("YES")
    else:
        print("NO")

Fixed code:
n=int(input())
for i in range(1,n+1):
    a,b,c=map(int,input().split())
    if a*a+b*b == c*c or b*b+c*c == a*a or c*c+a*a == b*b:
        print('YES')
    else:
        print('NO')
Buggy code:
n=int(input())
a=[]
c=[]
for i in range(n):
    a.append([])
    for j in range(3):
        a[i].append([])
print (a)
for i in range(n):
    #for j in range(3):
    a[i][0], a[i][1], a[i][2]=map(int, input().split())
    a[i].sort()
    if(((a[i][0]*a[i][0])+(a[i][1]*a[i][1]))==(a[i][2]*a[i][2])):
        k="YES"
        c.append(k)
    else:
        k="NO"
        c.append(k)
for i in range(n):
    print(c[i])

Fixed code:
n=int(input())
a=[]
c=[]
for i in range(n):
    a.append([])
    for j in range(3):
        a[i].append([])
for i in range(n):
    #for j in range(3):
    a[i][0], a[i][1], a[i][2]=map(int, input().split())
    a[i].sort()
    if(((a[i][0]*a[i][0])+(a[i][1]*a[i][1]))==(a[i][2]*a[i][2])):
        k="YES"
        c.append(k)
    else:
        k="NO"
        c.append(k)
for i in range(n):
    print(c[i])
Buggy code:
=  int(input())
for i in range(n):
    
    tri_list = list(map(int,input().split(" ")))
    #tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")


Fixed code:
n=int(input())
for i in range(n):
    t=list(map(int,input().split()))
    t.sort()
    a,b=t[0]**2+t[1]**2,t[2]**2
    if a==b:
        print("YES")
    else:
        print("NO")
Buggy code:
n = input()
for i in range(n):
    a,b,c = map(int, input().split())
    if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO")

Fixed code:
def cyokkaku(a,b,c):
    if a*a+b*b==c*c or b*b+c*c==a*a or c*c+a*a==b*b:
      print("YES")
    else:
      print("NO")
  
n=int(input())
for i in range (n):
    a,b,c=map (int,input().split())
    cyokkaku(a,b,c)
Buggy code:
N =  int(input())

for i in range(N):
    tri = input()
    tri_list = tri.split()
    tri_list.sort()
    print(tri_list)
    if int(tri_list[2]) ** 2 == int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2 :
        print("YES")
    else:
        print("NO")


Fixed code:
for i in range(int(input())):
    tri = [int(i) for i in input().split(' ')]
    tri.sort()
    if tri[0]**2 + tri[1]**2 == tri[2]**2:
        print('YES')
    else:
        print('NO')
Buggy code:
n = input()
for i in range(n):
    a, b, c = map(int, input().strip().split())
    print('YES' if a**2 + b**2 == c**2 else 'NO')

Fixed code:
n = int(input())

for i in range(n):
    a, b, c = map(int, input().split())
    if (a**2 == b**2 + c**2) or (b**2 == a**2 + c**2) or (c**2 == a**2 + b**2):
        print("YES")
    else:
        print("NO")
Buggy code:
for i in range(int(input())):
    a=map(int,raw_input().split())
    if a[0]**2+a[1]**2==a[2]**2:print("YES")
    else:print("NO")

Fixed code:
n=int(input())
for i in range(n):
    a=sorted(map(int,input().split()))

    print("YES" if (a[0]**2+a[1]**2)==a[2]**2 else "NO")
Buggy code:
n=int(input())
for i in range(n):
    p=list(map(int,input().split()))
    p.sort()
    a=x[0]
    b=x[1]
    c=x[2]
    if a*a+b*b==c*c:
        print('YES')
    else:
        print('NO')


Fixed code:
n=int(input())
for i in range(n):
    x=list(map(int,input().split()))
    x.sort()
    a=x[0]
    b=x[1]
    c=x[2]
    if a*a+b*b==c*c:
        print('YES')
    else:
        print('NO')
Buggy code:
n = int(input())
for i in range(n):
  h = list(map(int,input()))
  h.sort()
  if h[0]**2 ++ h[1]**2 == h[2]**2:
    print('YES')
  else:
    print('NO')

Fixed code:
n = int(input())
for i in range(n):
  a = list(map(int,input().split()))
  a.sort()
  if a[0]**2 + a[1]**2 == a[2]**2:
    print("YES")
  else:
    print("NO")
Buggy code:
N=int(input())
for i in range(N):
	a=map(int,input().split())
	a.sort()
	if a[0]**2+a[1]**2==a[2]**2:
		print("YES")
	else:
		print("NO")

Fixed code:
N = int(input())
for i in range(N):
    tri = list(map(int, input().split()))
    
    tri.sort()
    
    if tri[2]**2 == tri[0]**2 + tri[1]**2:
        print('YES')
    else:
        print('NO')
Buggy code:
N = int(input()) 
for i in range(N) :
   a,b,c = sorted(list(map(int,input().split())))
  
   if a**2 + b**2== c**2:
     print("YES")
   else
     print("NO")


Fixed code:
for i in range(int(input())):
    a,b,c = sorted(list(map(int,input().split())))

    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')
Buggy code:
def equation(a,b,c,d,e,f,x):
    buff = a*e-b*d
    buff_a = a

    a = e/buff
    b = -b/buff
    d = -d/buff
    e = buff_a/buff

    x.append((a*c)+(b*f))
    x.append((d*c)+(e*f))

count = 0
a = []
b = []
c = []
d = []
e = []
f = []

while True:
    try:
        buff = input().split()
        a.append(float(buff[0]))
        b.append(float(buff[1]))
        c.append(float(buff[2]))  
        d.append(float(buff[3]))
        e.append(float(buff[4]))
        f.append(float(buff[5]))
        count += 1
    except:
        break

for i in range(count):
    ans = []

    equation(a[i],b[i],c[i],d[i],e[i],f[i],ans)
    print('{:.4f}'.format(ans[0]),'{:.4f}'.format(ans[1]))


Fixed code:
def equation(a,b,c,d,e,f,x):
    buff = a*e-b*d
    buff_a = a

    a = e/buff
    b = -b/buff
    d = -d/buff
    e = buff_a/buff

    x.append((a*c)+(b*f))
    x.append((d*c)+(e*f))

count = 0
a = []
b = []
c = []
d = []
e = []
f = []

while True:
    try:
        buff = input().split()
        a.append(float(buff[0]))
        b.append(float(buff[1]))
        c.append(float(buff[2]))  
        d.append(float(buff[3]))
        e.append(float(buff[4]))
        f.append(float(buff[5]))
        count += 1
    except:
        break

for i in range(count):
    ans = []

    equation(a[i],b[i],c[i],d[i],e[i],f[i],ans)
    print('{:.3f}'.format(ans[0]),'{:.3f}'.format(ans[1]))
Buggy code:
import math
import itertools

while 1:
    try:
        a, b, c, d, e, f = map(int, input().split())
        print('{0:.3f} {1:.3f}'.format((e*c-b*f)/(a*e-b*d), (-d*c+a*f)/(a*e-b*d)))
    except:
        break

Fixed code:
import math
import itertools

while 1:
    try:
        a, b, c, d, e, f = map(int, input().split())
        print('{0:.3f} {1:.3f}'.format((e*c-b*f)/(a*e-b*d)+0, (-d*c+a*f)/(a*e-b*d)+0))
    except:
        break