ZhenlongDai/ACPR huggingface dataset:
Problem: p03309
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))

A = sorted([a - i for a, i in enumerate(A)])

print(sum(abs(x-y) for x,y in zip(A, A[::-1]))/2)

Failing test case input:
7
41 -4 -1 0 0 0 4

Expected output:
50


Actual output:
50.0


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))

A = sorted([a - i for a, i in enumerate(A)])

print(sum(abs(x-y) for x,y in zip(A, A[::-1]))

Problem: p03309
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from statistics import median
N = int(input())
A = [int(i) for i in input().split()]

B = [A[i] - (i+1) for i in range(N)]
b = int(median(B))

C = [abs(B[i] - b) for i in range(N)]

print(C)


Failing test case input:
7
177 -1 -3 -2 3 0 3

Expected output:
189


Actual output:
[180, 1, 2, 2, 2, 2, 0]


Fixed submission (verdict: Accepted):
from statistics import median
N = int(input())
A = [int(i) for i in input().split()]

B = [A[i] - (i+1) for i in range(N)]
b = int(median(B))

C = [abs(B[i] - b) for i in range(N)]

print(sum(C))

Problem: p03309
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
res = [int()]*n
for i in range(n):
    res[i] = a[i] - i - 1
res.sort()
x = sum(res)/n
x = int(x)
if x < 0:
    x -= 1

for j in range(n):
    res[j] = abs(res[j] - x)
print(sum(res))


Failing test case input:
7
44 0 -5 0 -1 -1 -2

Expected output:
61


Actual output:
84


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
res = [int()]*n
for i in range(n):
    res[i] = a[i] - i - 1
res.sort()
x = res[int(n/2)]
for j in range(n):
    res[j] = abs(res[j] - x)
print(sum(res))

Problem: p03309
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int, input().split()))
B=[A[i]-i-1 for i in range(N)]
m=sum(B)
ms=[m-2, m-1, m, m+1, m+2]
temp=[]
for i in range(3):
  m=ms[i]
  temp.append(sum([abs(B[j]-m) for j in range(N)]))
print(min(temp))

Failing test case input:
7
44 0 -5 0 -1 -1 -2

Expected output:
61


Actual output:
104


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int, input().split()))
B=[A[i]-i-1 for i in range(N)]
B.sort()
if N%2==1:
  print(sum([abs(B[i]-B[N
else:
  temp=(B[N
  ms=[temp+i for i in range(-2, 3, 1)]
  temp=[sum([abs(B[i]-ms[j]) for i in range(N)]) for j in range(5)]
  print(min(temp))
Problem: p02431
Buggy submission (Python3, verdict: Wrong Answer):
from sys import stdin
from collections import deque

num = int(input())

q = deque()

for i in range(num):

	cmd = stdin.readline().strip().split()

	if cmd[0] == "0":
		
		q.append(cmd[1])

	elif cmd[0] == "1":
		
		print(q[int(cmd[1])])
	else:
		
		q.pop()

print(*q,sep='\n')




Failing test case input:
8
0 1
0 2
0 1
2
0 4
1 0
1 2
1 2

Expected output:
1
4
4


Actual output:
1
4
4
1
2
4


Fixed submission (verdict: Accepted):
from sys import stdin
from collections import deque

num = int(input())

q = deque()

for i in range(num):

	cmd = stdin.readline().strip().split()

	if cmd[0] == "0":
		
		q.append(cmd[1])

	elif cmd[0] == "1":
		
		print(q[int(cmd[1])],sep='\n')
	else:
		
		q.pop()
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):


def get_input():
    for i in range(int(input())):
        yield "".join(input())
    print()
  
if __name__ == "__main__":
    array = list(get_input())
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)^2 + int(b)^2 == int(c)^2:
            print("YES")
        elif int(c)^2 + int(a)^2 == int(b)^2:
            print("YES")
        elif int(b)^2 + int(c)^2 == int(a)^2:
            print("YES")
        else:
            print("NO")     

Failing test case input:
3
2 2 -2
2 5 0
3 16 -3

Expected output:
NO
NO
NO


Actual output:

YES
NO
NO


Fixed submission (verdict: Accepted):


def get_input():
    for i in range(int(input())):
        yield "".join(input())

if __name__ == "__main__":
    array = list(get_input())
    
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)**2 + int(b)**2 == int(c)**2:
            print(u"YES")
        elif int(c)**2 + int(a)**2 == int(b)**2:
            print(u"YES")
        elif int(b)**2 + int(c)**2 == int(a)**2:
            print(u"YES")
        else:
            print(u"NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def main():

    data_count = int(input())
    data = [tuple(map(int, input().split())) for i in range(data_count)]

    for item in data:
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO')


main()

Failing test case input:
3
1 1 0
29 1 -1
0 1 -1

Expected output:
YES
NO
YES


Actual output:
NO
NO
YES


Fixed submission (verdict: Accepted):
def main():

    data_count = int(input())
    data = [list(map(int, input().split())) for i in range(data_count)]

    for item in data:
        item.sort()
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO')


main()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def tri(a,b,c):
	return a**2 == b**2 + c**2
for time in range(int(input())):
	x,y,z = [int(i) for i in input().split()]
print(tri(x,y,z))

Failing test case input:
3
4 3 5
4 3 6
8 8 8

Expected output:
YES
NO
NO

Actual output:
False


Fixed submission (verdict: Accepted):
def tri(a,b,c):
	return a**2 == b**2 + c**2
for time in range(int(input())):
	x,y,z = [int(i) for i in input().split()]
	if tri(x,y,z) or tri(y,z,x) or tri(z,x,y):
		print("YES")
	else:
		print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    if k[0]**2 + k[1]**2 == k[2]:
        print(True)
    else:
        print(False)

Failing test case input:
3
2 5 -3
0 2 2
1 4 1

Expected output:
NO
YES
NO


Actual output:
False
False
False


Fixed submission (verdict: Accepted):
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= sorted(k)
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
array = [[int(i) for i in input().split()] for i in range(n)]
for i in range(n):
    if array[i][0]**2+array[i][1]**2 == array[i][2]**2:
        print("Yes")
    elif array[i][0]**2+array[i][2]**2 == array[i][1]**2:
        print("Yes")
    elif array[i][1]**2+array[i][2]**2 == array[i][0]**2:
        print("Yes")
    else:
        print("No")

Failing test case input:
3
2 5 -3
0 2 2
1 4 1

Expected output:
NO
YES
NO


Actual output:
No
Yes
No


Fixed submission (verdict: Accepted):
n = int(input())
array = [[int(i) for i in input().split()] for i in range(n)]
for i in range(n):
    if array[i][0]**2+array[i][1]**2 == array[i][2]**2:
        print("YES")
    elif array[i][0]**2+array[i][2]**2 == array[i][1]**2:
        print("YES")
    elif array[i][1]**2+array[i][2]**2 == array[i][0]**2:
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
import math

def main():

    data_count = int(input())
    data = [tuple(map(int, input().split())) for i in range(data_count)]

    for item in data:
        print('YES') if math.hypot(item[0], item[1]) == float(item[2]) else print('NO')


main()

Failing test case input:
3
0 2 -2
0 1 1
0 4 15

Expected output:
YES
YES
NO


Actual output:
NO
YES
NO


Fixed submission (verdict: Accepted):
def main():

    data_count = int(input())
    data = [list(map(int, input().split())) for i in range(data_count)]

    for item in data:
        item.sort()
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO')


main()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n=int(input())
for i in range(n):
 a,b,c=[int(j) for j in input().split()]
 if a==b and b==c:
  print("YES")
 else:
  print("NO")

Failing test case input:
3
4 3 5
0 3 6
8 8 8

Expected output:
YES
NO
NO


Actual output:
NO
NO
YES


Fixed submission (verdict: Accepted):
n=int(input())
for i in range(n):
 x=[int(j) for j in input().split()]
 x.sort()
 if x[2]**2==x[0]**2+x[1]**2:
  print("YES")
 else:
  print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
cnt = int(input())
values = []
for i in range(cnt):
    values.append([int(x) for x in input().split()])

for x, y, z in values:
    if int(z) ** 2 == int(x) ** 2 + int(y) ** 2:
        print('YES')
    else:
        print('NO')

Failing test case input:
3
1 1 0
29 1 -1
0 1 -1

Expected output:
YES
NO
YES


Actual output:
NO
NO
YES


Fixed submission (verdict: Accepted):
cnt = int(input())
values = []
for i in range(cnt):
    values.append([int(x) for x in input().split()])

for x, y, z in values:
    if z ** 2 == x ** 2 + y ** 2:
        print('YES')
    elif x ** 2 == y ** 2 + z ** 2:
        print('YES')
    elif y ** 2 == x ** 2 + z ** 2:
        print('YES')
    else:
        print('NO')
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
for _ in[0]*int(input()):
 a,b,c=map(int,sorted(input().split()))
 print(['No','Yes'][a*a+b*b==c*c])


Failing test case input:
3
2 2 -2
-1 5 -1
3 11 -2

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
i = 0
ans = []
while True:
    if n == i:
        break
    else:
        i += 1
    a, b, c = map(int, input().split())
    if c**2 == a**2+b**2:
        ans.append("YES")
    else:
        ans.append("NO")
for i in range(n):
    print(ans[i])

Failing test case input:
3
2 2 -2
-1 1 0
3 2 0

Expected output:
NO
YES
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
N = int(input())
ans = []
for i in range(N):
    d = list(map(int, input().split()))
    d.sort()
    if d[2]**2 == d[1]**2+d[0]**2:
        ans.append("YES")
    else:
        ans.append("NO")
for i in range(N):
    print(ans[i])

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
N = int(input())
for i in range(N):
    a, b, c = map(int, input().split())
    d = (a + b + c) / 2
    if(a > d or b > d or c > d):
        print("NO")
    else:
        print("YES")

Failing test case input:
3
2 5 -2
3 5 2
4 10 -3

Expected output:
NO
NO
NO


Actual output:
NO
YES
NO


Fixed submission (verdict: Accepted):
N = int(input())
for i in range(N):
    a, b, c = map(int, input().split())
    if(a > c):
        a, c = c, a
    if(b > c):
        b, c = c, b
    if(c**2 == a**2 + b**2):
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def get_input():
    for i in range(int(input())):
        yield "".join(input())

if __name__ == "__main__":
    array = list(get_input())
    
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)^2 + int(b)^2 == int(c)^2:
            print(u"YES")
        elif int(c)^2 + int(a)^2 == int(b)^2:
            print(u"YES")
        elif int(b)^2 + int(c)^2 == int(a)^2:
            print(u"YES")
        else:
            print(u"NO")

Failing test case input:
3
1 5 -3
0 2 0
0 10 1

Expected output:
NO
NO
NO


Actual output:
NO
YES
NO


Fixed submission (verdict: Accepted):


def get_input():
    for i in range(int(input())):
        yield "".join(input())

if __name__ == "__main__":
    array = list(get_input())
    
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)**2 + int(b)**2 == int(c)**2:
            print(u"YES")
        elif int(c)**2 + int(a)**2 == int(b)**2:
            print(u"YES")
        elif int(b)**2 + int(c)**2 == int(a)**2:
            print(u"YES")
        else:
            print(u"NO")
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')

Failing test case input:
3
1 1 0
29 1 -1
0 1 -1

Expected output:
YES
NO
YES


Actual output:
NO
NO
YES


Fixed submission (verdict: Accepted):
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= sorted(k)
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(int(input())):
    values = sorted(map(lambda x: int(x)^2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print('YES')
    else:
        print('NO')



Failing test case input:
3
2 5 -2
0 1 0
1 2 1

Expected output:
NO
NO
NO


Actual output:
NO
NO
YES


Fixed submission (verdict: Accepted):

for i in range(int(input())):
    values = sorted(map(lambda x: int(x)**2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(int(input())):
	values = sorted(map(lambda x: int(x)^2, input().split()))
	if values[2] == values[1] + values[0]:
		print('YES')
	else:
		print('NO')


Failing test case input:
3
5 5 0
3 5 1
4 6 -4

Expected output:
YES
NO
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):

for i in range(int(input())):
    values = sorted(map(lambda x: int(x)**2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
ans = list()

for i in range(n):
    line = input().split(" ")
    if (line[0] == line[1]) or (line[1] == line[2]) or (line[0] == line[2]):
        ans.append("YES")
    else:
        ans.append("NO")

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

Failing test case input:
3
4 5 5
-2 3 6
13 8 1

Expected output:
NO
NO
NO


Actual output:
YES
NO
NO


Fixed submission (verdict: Accepted):
n = int(input())
ans = list()

for i in range(n):
        line = input().split(" ")
        a = float(line[0])
        b = float(line[1])
        c = float(line[2])
        if ((a**2 + b**2) == c**2) or ((b**2 + c**2) == a**2) or ((c**2 + a**2) == b**2):
            ans.append("YES")
        else:
            ans.append("NO")

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

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
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') 

Failing test case input:
3
1 5 -3
-1 2 2
0 6 2

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
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')
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):


def get_input():
    for i in range(int(input())):
        yield "".join(input())



if __name__ == "__main__":
    array = list(get_input())
    
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)^2 + int(b)^2 == int(c)^2:
            print(u"YES")
        elif int(c)^2 + int(a)^2 == int(b)^2:
            print(u"YES")
        elif int(b)^2 + int(c)^2 == int(a)^2:
            print(u"YES")
        else:
            print(u"NO")

Failing test case input:
3
2 2 -2
-1 5 -1
3 15 -1

Expected output:
NO
NO
NO


Actual output:
YES
NO
NO


Fixed submission (verdict: Accepted):


def get_input():
    for i in range(int(input())):
        yield "".join(input())

if __name__ == "__main__":
    array = list(get_input())
    
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)**2 + int(b)**2 == int(c)**2:
            print(u"YES")
        elif int(c)**2 + int(a)**2 == int(b)**2:
            print(u"YES")
        elif int(b)**2 + int(c)**2 == int(a)**2:
            print(u"YES")
        else:
            print(u"NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
class triangle():
    def __init__(self,a,b,c):
        self.a = a
        self.b = b
        self.c = c

    def calc(self):
        a = self.a ** 2
        b = self.b ** 2
        c = self.c ** 2

        if a+b == c:
            return True
        else:
            return False

    def print(self):
        ans = self.calc()
        if ans:
            print("YES")
        else:
            print("NO")

def main():
    data = []
    array_size = int(input())

    for i in range(array_size):
        n = input().split()
        a = int(n[0])
        b = int(n[1])
        c = int(n[2])

        data.append(triangle(a,b,c))

    for array in data:
        array.print()

if __name__ == "__main__":
    main()

Failing test case input:
3
1 1 0
29 1 -1
0 1 -1

Expected output:
YES
NO
YES


Actual output:
NO
NO
YES


Fixed submission (verdict: Accepted):
class triangle():
    def __init__(self,a,b,c):
        self.a = a
        self.b = b
        self.c = c

    def calc(self):
        a = int(self.a**2)
        b = int(self.b**2)
        c = int(self.c**2)

        if (a+b == c) or (b+c == a) or (a+c == b):
            return True
        else:
            return False

    def print(self):
        ans = self.calc()
        if ans:
            print("YES")
        else:
            print("NO")

def main():
    data = []
    array_size = int(input())

    for i in range(array_size):
        n = input().split()
        a = int(n[0])
        b = int(n[1])
        c = int(n[2])

        data.append(triangle(a,b,c))

    for array in data:
        array.print()

if __name__ == "__main__":
    main()
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())

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


Failing test case input:
3
3 5 1
3 5 0
8 6 -4

Expected output:
NO
NO
NO


Actual output:
no
no
no


Fixed submission (verdict: Accepted):
n = int(input())

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

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):

for i in range(int(input())):
    values = sorted(map(lambda x: int(x)^2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print("YES")
    else:
        print("NO")



Failing test case input:
3
-1 -2 0
0 1 -1
-2 0 2

Expected output:
NO
YES
YES


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):

for i in range(int(input())):
    values = sorted(map(lambda x: int(x)**2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n=int(input())
for i in range(n):
	x,y,z=map(int,input().split())
	A=[x,y,z]
	A.sort(reverse=True)
	if A[0]**2==A[1]**2+A[2]**2:
		print("Yes")
	else:
		print("No")

Failing test case input:
3
4 5 0
2 5 2
1 4 -1

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
n=int(input())
for i in range(n):
	A=[int(j) for j in input().split()]
	A.sort()
	if A[0]**2+A[1]**2==A[2]**2:
		print("YES")
	else:
		print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
cnt = int(input())
values = []
for i in range(cnt):
    values.append([int(x) for x in input().split()])

for x, y, z in values:
    if z ** 2 == x ** 2 + y ** 2:
        print('YES')
    else:
        print('NO')

Failing test case input:
3
5 5 0
3 5 1
4 6 -4

Expected output:
YES
NO
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
cnt = int(input())
values = []
for i in range(cnt):
    values.append([int(x) for x in input().split()])

for x, y, z in values:
    if z ** 2 == x ** 2 + y ** 2:
        print('YES')
    elif x ** 2 == y ** 2 + z ** 2:
        print('YES')
    elif y ** 2 == x ** 2 + z ** 2:
        print('YES')
    else:
        print('NO')

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for _ in range(n):
    a, b, c = map(int, input().split())
    if a**2 + b**2 == c**2:
        print("YES")
    else:
        print("NO")


Failing test case input:
3
2 2 -2
-1 1 0
3 2 0

Expected output:
NO
YES
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
n = int(input())
for _ in range(n):
    a, b, c = map(int, input().split())
    if (a**2 + b**2 == c**2) or\
            (b**2 + c**2 == a**2) or\
            (c**2 + a**2 == b**2):
        print("YES")
    else:
        print("NO")
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
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()

Failing test case input:
3
4 5 5
-2 5 6
2 8 0

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
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()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('Yes')
    else:
        print('No')

Failing test case input:
3
2 2 -2
0 5 -1
3 15 -1

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= sorted(k)
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for i in range(n):
    a, b, c = sorted(list(map(int, input().split())))
    if c ** 2 == (a ** 2 + b ** 2):
        print("Yes")
    else:
        print("No")

Failing test case input:
3
4 5 5
-2 3 6
13 8 0

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
n = int(input())
for i in range(n):
    a, b, c = sorted(list(map(int, input().split())))
    if c ** 2 == (a ** 2 + b ** 2):
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
import sys

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

Failing test case input:
3
0 2 -2
0 1 1
0 4 15

Expected output:
YES
YES
NO


Actual output:
3
NO
NO
NO


Fixed submission (verdict: Accepted):
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')
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
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')

Failing test case input:
3
4 5 5
-2 5 6
2 8 0

Expected output:
NO
NO
NO


Actual output:
3
NO
NO
NO


Fixed submission (verdict: Accepted):
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')

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def main():
    n = int(input())
    if n <= 0:
        return None
    li = [input() for _ in range(n)]
    li = sorted(li)
    for x in li:
        tmp = x.split(" ")
        for i in range(len(tmp)):
            tmp[i] = int(tmp[i])
        tmp = sorted(tmp)
        a,b,c = tmp[0],tmp[1],tmp[2]
        if (a**2 + b**2) == c**2:
            print("YES")
        else:
            print("NO")
    return None

if __name__ == '__main__':
    main()

Failing test case input:
3
2 5 -3
0 1 1
1 2 1

Expected output:
NO
YES
NO


Actual output:
YES
NO
NO


Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    while True:
        try:
            num_list = [int(i) for i in input().split()]
            num_list = sorted(num_list)
            a,b,c = num_list[0],num_list[1],num_list[2]
            if (a**2 + b**2) == c**2:
                print("YES")
            else:
                print("NO")
        except EOFError:
            break
    return None

if __name__ == '__main__':
    main()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def triangle(a, b, c):
    return a * a + b * b == c * c

t = int(input())
for i in range(t):
    a, b, c = input().split(' ')
    a = int(a)
    b = int(b)
    c = int(c)
    r = triangle(a, b, c)
    if (r): print("YES")
    else: print("NO")

Failing test case input:
3
5 5 0
3 5 1
4 6 -4

Expected output:
YES
NO
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
def triangle(a, b, c):
    return a * a + b * b == c * c

t = int(input())
for i in range(t):
    sides = input().split(' ')
    for i in range(3):
        sides[i] = int(sides[i])
    sides.sort()
    r = triangle(sides[0], sides[1], sides[2])
    if (r): print("YES")
    else: print("NO")
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def main():
    n = int(input())
    for i in range(n):
        a, b, c=(int(x) for x in input().split())
        if a+b<=c or a+c<=b or b+c<=a:
            print("NO")
        else:
            print("YES")

main()


Failing test case input:
3
4 5 5
-2 3 6
13 8 0

Expected output:
NO
NO
NO


Actual output:
YES
NO
NO


Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    for i in range(n):
        a=[int(x) for x in input().split()]
        a.sort()
        if a[0] ** 2 + a[1] ** 2 != a[2] ** 2:
            print("NO")
        else:
            print("YES")

main()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n=int(input())
for i in range(n):
	A=[int(j) for j in input().split()]
	if(A[0]**2+A[1]**2==A[2]**2):
		print("YES")
	else:
		print("NO")

Failing test case input:
3
2 2 -2
-1 1 0
3 2 0

Expected output:
NO
YES
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
n=int(input())
for i in range(n):
	A=[int(j) for j in input().split()]
	A.sort()
	if A[0]**2+A[1]**2==A[2]**2:
		print("YES")
	else:
		print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
import sys

for line in sys.stdin:
    try:
        a,b,c = [int(x) for x in line.split()]
        if (a**2+b**2) == c**2:
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

Failing test case input:
3
2 2 -2
-1 1 0
3 2 0

Expected output:
NO
YES
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
import sys

for line in sys.stdin:
    try:
        a,b,c = [int(x) for x in line.split()]
        if (a**2+b**2) == c**2:
            print('YES')
        elif (a**2+c**2) == b**2:
            print('YES')
        elif (b**2+c**2) == a**2:
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):


def get_input():
    for i in range(int(input())):
        yield "".join(input())



if __name__ == "__main__":
    array = list(get_input())
    
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)^2 + int(b)^2 == int(c)^2:
            print("YES")
        elif int(c)^2 + int(a)^2 == int(b)^2:
            print("YES")
        elif int(b)^2 + int(c)^2 == int(a)^2:
            print("YES")
        else:
            print("NO")

Failing test case input:
3
2 5 -2
0 1 1
1 2 1

Expected output:
NO
YES
NO


Actual output:
NO
NO
YES


Fixed submission (verdict: Accepted):


def get_input():
    for i in range(int(input())):
        yield "".join(input())

if __name__ == "__main__":
    array = list(get_input())
    
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)**2 + int(b)**2 == int(c)**2:
            print(u"YES")
        elif int(c)**2 + int(a)**2 == int(b)**2:
            print(u"YES")
        elif int(b)**2 + int(c)**2 == int(a)**2:
            print(u"YES")
        else:
            print(u"NO")
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def main():
    n = int(input())
    li = [input() for _ in range(n)]
    li = sorted(li)
    for x in li:
        tmp = x.split(" ")
        tmp = sorted(tmp)
        a,b,c = int(tmp[0]),int(tmp[1]),int(tmp[2])
        if (a ** 2 + b **2) == c**2:
            print("YES")
        else:
            print("NO")

if __name__ == '__main__':
    main()

Failing test case input:
3
2 2 -2
-1 1 0
3 2 0

Expected output:
NO
YES
NO


Actual output:
YES
NO
NO


Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    while True:
        try:
            num_list = [int(i) for i in input().split()]
            num_list = sorted(num_list)
            a,b,c = num_list[0],num_list[1],num_list[2]
            if (a**2 + b**2) == c**2:
                print("YES")
            else:
                print("NO")
        except EOFError:
            break
    return None

if __name__ == '__main__':
    main()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def main():
    def inputs():
        li = []
        count = 0
        try:
            N = input()
            while count < int(N):
                li.append(input())
                count += 1
        except EOFError:
            return li
        return li

    li = inputs()
    for x in li:
        tmp = x.split(" ")
        tmp = sorted(tmp)
        a,b,c = int(tmp[0]),int(tmp[1]),int(tmp[2])
        if c**2 == a**2 + b**2:
            print("YES")
        else:
            print("NO")
    return None

Failing test case input:
3
2 2 -2
-1 5 0
3 4 0

Expected output:
NO
NO
NO


Actual output:

Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    while True:
        try:
            num_list = [int(i) for i in input().split()]
            num_list = sorted(num_list)
            a,b,c = num_list[0],num_list[1],num_list[2]
            if (a**2 + b**2) == c**2:
                print("YES")
            else:
                print("NO")
        except EOFError:
            break
    return None

if __name__ == '__main__':
    main()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
num = int(input())
for i in range (num):
    a=input().split()
    if a[0]==a[1] and a[1]==a[2]:
        print("YES")
    else:
        print("NO")

   

Failing test case input:
3
1 5 -3
0 2 2
1 4 1

Expected output:
NO
YES
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
num = int(input())
for i in range (num):
    a=sorted(list(map(int,input().split())))
    if a[0]**2+a[1]**2 == (a[2])**2:
        print("YES")
    else:
        print("NO")
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
cnt = int(input())
values = []
for i in range(cnt):
    values.append([int(x) for x in input().split()])

for x, y, z in values:
    if int(z ** 2) == int(x ** 2) + int(y ** 2):
        print('YES')
    else:
        print('NO')

Failing test case input:
3
5 5 0
3 5 1
4 6 -4

Expected output:
YES
NO
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
cnt = int(input())
values = []
for i in range(cnt):
    values.append([int(x) for x in input().split()])

for x, y, z in values:
    if z ** 2 == x ** 2 + y ** 2:
        print('YES')
    elif x ** 2 == y ** 2 + z ** 2:
        print('YES')
    elif y ** 2 == x ** 2 + z ** 2:
        print('YES')
    else:
        print('NO')

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):

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



Failing test case input:
3
2 2 -2
-1 1 0
3 2 0

Expected output:
NO
YES
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):

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

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):



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')

Failing test case input:
3
2 5 -2
3 5 2
3 10 -3

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):



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')

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):


def get_input():
    for i in range(int(input())):
        yield "".join(input())
  
if __name__ == "__main__":
    array = list(get_input())
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)^2 + int(b)^2 == int(c)^2:
            print("YES")
        elif int(c)^2 + int(a)^2 == int(b)^2:
            print("YES")
        elif int(b)^2 + int(c)^2 == int(a)^2:
            print("YES")
        else:
            print("NO")     

Failing test case input:
3
3 5 1
3 5 0
4 6 -4

Expected output:
NO
NO
NO


Actual output:
NO
YES
NO


Fixed submission (verdict: Accepted):


def get_input():
    for i in range(int(input())):
        yield "".join(input())

if __name__ == "__main__":
    array = list(get_input())
    
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)**2 + int(b)**2 == int(c)**2:
            print(u"YES")
        elif int(c)**2 + int(a)**2 == int(b)**2:
            print(u"YES")
        elif int(b)**2 + int(c)**2 == int(a)**2:
            print(u"YES")
        else:
            print(u"NO")
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    if k[0]**2 + k[1]**2 == k[2]**2:
        print(True)
    else:
        print(False)

Failing test case input:
3
2 2 -2
-1 5 0
3 4 0

Expected output:
NO
NO
NO


Actual output:
False
False
False


Fixed submission (verdict: Accepted):
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= sorted(k)
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())

for c in range(n):
    line = input()
    datas = map(int, line.split())
    li = list(datas) 
    a = li[0]
    b = li[1]
    c = li[2]

    if a < c and b < c:
        a2 = a ** 2
        b2 = b ** 2
        c2 = c ** 2
        if (a2 + b2) == c2:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Failing test case input:
3
2 5 -3
0 2 2
1 4 1

Expected output:
NO
YES
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):

def check(a, b, c):

    a2 = a ** 2
    b2 = b ** 2
    c2 = c ** 2

    if (a2 + b2) == c2:
        return True
    else:
        return False


n = int(input())

for c in range(n):
    line = input()
    datas = map(int, line.split())
    li = list(datas) 
    a = li[0]
    b = li[1]
    c = li[2]

    if check(a, b, c) or check(b, c, a) or check(c, a, b):
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
import sys

num = int(sys.stdin.readline().strip())

for i in range(num):
    data = sys.stdin.readline().strip().split(' ')
    a = int(data[0])
    b = int(data[1])
    c = int(data[2])
    if a == b and b == c:
        print('YES')
    else:
        print('NO')
        

Failing test case input:
3
5 5 0
3 5 1
4 6 -4

Expected output:
YES
NO
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
import sys

def is_right(edges):
    max_len = max(edges)
    edges.remove(max_len)
    return max_len ** 2 == edges[0] ** 2 + edges[1] ** 2
    
num = int(sys.stdin.readline().strip())

for i in range(num):
    data = sys.stdin.readline().strip().split(' ')
    a = int(data[0])
    b = int(data[1])
    c = int(data[2])
    if is_right([a, b, c]):
        print('YES')
    else:
        print('NO')
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list)

def check_tri(len_list):
	import itertools
	flag = True
	for tmp in list(itertools.permutations(len_list)):
		if (tmp[0] + tmp[1]) < tmp[2]:
			flag = False
			break

	if flag == True:
		print('yes')
	else:
		print('no')

if __name__ == '__main__':
	main()

Failing test case input:
3
2 2 -2
0 5 0
3 16 -4

Expected output:
NO
NO
NO


Actual output:
no
no
no


Fixed submission (verdict: Accepted):
def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list)

def check_tri(len_list):
	import itertools
	import math

	flag = False
	for tmp in list(itertools.permutations(len_list)):
		if (pow(tmp[0], 2) + pow(tmp[1], 2)) == pow(tmp[2], 2):
			flag = True
			break

	if flag == True:
		print('YES')
	else:
		print('NO')

if __name__ == '__main__':
	main()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n=int(input())
r=[0]*n
for i in range(n):
    r[i]=sorted(list(map(int,input().split())))
for i in range(n):
    print("Yes" if r[i][0]**2+r[i][1]**2==r[i][2]**2 else "No")

Failing test case input:
3
0 5 0
3 5 1
4 6 -4

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
n=int(input())
r=[0]*n
for i in range(n):
    r[i]=sorted(list(map(int,input().split())))
for i in range(n):
    print("YES" if r[i][0]**2+r[i][1]**2==r[i][2]**2 else "NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for i in range(n):
    li = sorted([int(j) for j in input().split()])
    print("Yes" if li[0] ** 2 + li[1] ** 2 == li[2] ** 2 else "No")

Failing test case input:
3
1 5 -1
3 5 1
4 6 -4

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
for i in range(int(input())):
    li = sorted([int(j) for j in input().split()])
    print("YES" if li[0] ** 2 + li[1] ** 2 == li[2] ** 2 else "NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
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):
    
    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])

Failing test case input:
3
4 5 5
-2 4 6
2 8 0

Expected output:
NO
NO
NO


Actual output:
[[[], [], []], [[], [], []], [[], [], []]]
NO
NO
NO


Fixed submission (verdict: Accepted):
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):
    
    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])
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
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()


Failing test case input:
3
4 3 5
4 3 6
8 8 8

Expected output:
YES
NO
NO

Actual output:
Yes
NO
NO


Fixed submission (verdict: Accepted):
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()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def main():

    data_count = int(input())
    data = [tuple(map(int, input().split())) for i in range(data_count)]

    for item in data:
        print('Yes') if item[0]**2 + item[1]**2 == item[2]**2 else print('No')


main()

Failing test case input:
3
4 5 5
-2 5 6
3 8 0

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
def main():

    data_count = int(input())
    data = [list(map(int, input().split())) for i in range(data_count)]

    for item in data:
        item.sort()
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO')


main()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(int(input())):
	values = sorted(map(lambda x: int(x)^2, input().split(' ')))
	if values[2] == values[1] + values[0]:
		print('YES')
	else:
		print('NO')


Failing test case input:
3
2 5 -3
0 1 1
1 4 1

Expected output:
NO
YES
NO


Actual output:
NO
NO
YES


Fixed submission (verdict: Accepted):

for i in range(int(input())):
    values = sorted(map(lambda x: int(x)**2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n=int(input())
for i in range(n):
	x,y,z=map(int,input().split())
	if (x+y>z)and(y+z>x)and(z+x>y):
		print("YES")
	else:
		print("NO")

	

Failing test case input:
3
4 3 5
0 3 6
8 8 8

Expected output:
YES
NO
NO


Actual output:
YES
NO
YES


Fixed submission (verdict: Accepted):
n=int(input())
for i in range(n):
	A=[int(j) for j in input().split()]
	A.sort()
	if A[0]**2+A[1]**2==A[2]**2:
		print("YES")
	else:
		print("NO")
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(int(input())):
    values = sorted(map(lambda x: int(x)^2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print('YES')
    else:
        print('No')


Failing test case input:
3
0 5 -1
3 5 1
4 6 -4

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):

for i in range(int(input())):
    values = sorted(map(lambda x: int(x)**2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for i in range(n):
    side = list(map(int,input().split()))

    side.sort()
    if(side[0]**2 + side[1]**2 == side[2]**2):
        print("Yes")
    else:
        print("No")

Failing test case input:
3
1 5 -3
-2 2 3
0 10 0

Expected output:
NO
NO
NO


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
n = int(input())
for i in range(n):
    side = list(map(int,input().split()))

    side.sort()
    if(side[0]**2 + side[1]**2 == side[2]**2):
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
d=input()
for a in range(int(d)):
    a,b,c=map(int,input().split())
    if(max(a,b,c)*2>=a+b+c):
        print(False)
    else:
        print(True)



Failing test case input:
3
2 5 -2
3 5 2
4 10 -4

Expected output:
NO
NO
NO


Actual output:
False
False
False


Fixed submission (verdict: Accepted):
for i in range(int(input())):
    a,b,c=sorted(map(int, input().split()))
    if a**2+b**2==c**2:
        print('YES')
    else:
        print('NO')

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
N = int(input())
for i in range(N):
    a = list(map(int, input().split()))
    a = sorted(a)
    x = a[0]
    y = a[1]
    z = a[2]
    if x**2 + y**2 == z**2:
        print("yes")
    else:
        print("no")
        

Failing test case input:
3
2 5 -2
0 1 0
3 2 0

Expected output:
NO
NO
NO


Actual output:
no
no
no


Fixed submission (verdict: Accepted):
N = int(input())
for i in range(N):
    a = list(map(int, input().split()))
    a = sorted(a)
    x = a[0]
    y = a[1]
    z = a[2]
    if x**2 + y**2 == z**2:
        print("YES")
    else:
        print("NO")

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n=int(input())
for i in range(n):
	x,y,z=map(int,input().split())
	if x**2+y**2==z**2:
		print("YES")
	else:
		print("NO")

Failing test case input:
3
2 2 -2
-1 1 0
3 2 0

Expected output:
NO
YES
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
n=int(input())
for i in range(n):
	A=[int(j) for j in input().split()]
	A.sort()
	if A[0]**2+A[1]**2==A[2]**2:
		print("YES")
	else:
		print("NO")
Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
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])

    

Failing test case input:
3
2 5 -3
0 2 2
1 4 1

Expected output:
NO
YES
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
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])

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
def main():
    n = int(input())
    li = [input() for _ in range(n)]
    li = sorted(li)
    for x in li:
        tmp = x.split(" ")
        tmp = sorted(tmp)
        a,b,c = int(tmp[0]),int(tmp[1]),int(tmp[2])
        if (a ** 2 + b **2) == c**2:
            print("YES")
        else:
            print("NO")
    return None

if __name__ == '__main__':
    main()

Failing test case input:
3
2 5 -3
0 2 2
1 4 1

Expected output:
NO
YES
NO


Actual output:
YES
NO
NO


Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    while True:
        try:
            num_list = [int(i) for i in input().split()]
            num_list = sorted(num_list)
            a,b,c = num_list[0],num_list[1],num_list[2]
            if (a**2 + b**2) == c**2:
                print("YES")
            else:
                print("NO")
        except EOFError:
            break
    return None

if __name__ == '__main__':
    main()

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
n = int(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')

Failing test case input:
3
2 2 -2
-1 1 0
3 2 0

Expected output:
NO
YES
NO


Actual output:
NO
NO
NO


Fixed submission (verdict: Accepted):
n = int(input())
for i in range(n):
    a, b, c = sorted(map(int, input().strip().split()))
    print('YES' if a**2 + b**2 == c**2 else 'NO')

Problem: p00003
Buggy submission (Python3, verdict: Wrong Answer):
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")

Failing test case input:
3
-1 -2 0
0 1 -1
-2 0 2

Expected output:
NO
YES
YES


Actual output:
NO
TES
TES


Fixed submission (verdict: Accepted):
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")