s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
int64
0
100
memory
stringlengths
4
6
code_size
int64
15
14.7k
code
stringlengths
15
14.7k
problem_id
stringlengths
6
6
problem_description
stringlengths
358
9.83k
input
stringlengths
2
4.87k
output
stringclasses
807 values
__index_level_0__
int64
1.1k
1.22M
s446202378
p00003
u528181593
1594627204
Python
Python3
py
Accepted
40
5596
200
n=int(input()) for i in range (n): l=list(map(int,input().split())) L=sorted(l) if (L[0])*(L[0])+(L[1])*(L[1])==(L[2])*(L[2]): print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,002
s310273327
p00003
u421274895
1594621164
Python
Python3
py
Accepted
40
5600
194
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")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,003
s818973827
p00003
u278236319
1594614957
Python
Python3
py
Accepted
40
5592
205
N = int(input()) for i in range(N): a, b, c = map(int, input().split()) if (a**2 + b**2 == c**2 or a**2 + c**2 == b**2 or c**2 + b**2 == a**2) : print("YES") else : print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,004
s388756800
p00003
u082412851
1594470882
Python
Python3
py
Accepted
40
5600
193
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')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,005
s858127955
p00003
u062640303
1594449419
Python
Python3
py
Accepted
40
5596
188
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) if (a**2+b**2)==c**2 or (a**2+c**2)==b**2 or (c**2+b**2)==a**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,006
s691735836
p00003
u799016206
1594022486
Python
Python3
py
Accepted
40
5648
182
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")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,007
s123873326
p00003
u189528630
1594011994
Python
Python3
py
Accepted
50
5612
270
n=int(input()) for i in range(n): a=list(map(float,input().split())) if a[0]**2+a[1]**2==a[2]**2: print("YES") elif a[1]**2+a[2]**2==a[0]**2: print("YES") elif a[2]**2+a[0]**2==a[1]**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,008
s964799707
p00003
u635020217
1593975956
Python
Python3
py
Accepted
40
5596
199
# coding: utf-8 # Your code here! N = int(input()) for i in range(N): a,b,c = sorted(map(int,input().split())) if a*a + b*b == c*c: print ("YES") else: print ("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,009
s684904738
p00003
u706683821
1593855761
Python
Python3
py
Accepted
50
5592
211
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) A=max(a,max(b,c)) B=min(a,min(b,c)) C=a+b+c-A-B if B**2+C**2==A**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,010
s427617461
p00003
u100874602
1593848851
Python
Python3
py
Accepted
40
5596
152
N=int(input()) for i in range(N): x,y,z=sorted(map(int,input().split())) if x**2+y**2==z**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,011
s827030419
p00003
u555228137
1593480947
Python
Python3
py
Accepted
40
5592
182
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) if a**2+b**2==c**2 or a**2+c**2==b**2 or b**2+c**2==a**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,012
s101660096
p00003
u709176169
1593476847
Python
Python3
py
Accepted
40
5592
238
N=int(input()) for i in range(N): x,y,z=map(int,input().split()) if x**2==y**2+z**2: print('YES') elif y**2==x**2+z**2: print('YES') elif z**2==x**2+y**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,013
s880361371
p00003
u118506623
1593430388
Python
Python3
py
Accepted
40
5596
200
n = int(input()) for i in range(n): a, b, c = map(int,input().split()) if a**2 + b**2 == c**2 or a**2 + c**2 == b**2 or b**2 + c**2 == a**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,014
s777518303
p00003
u272062354
1593413352
Python
Python3
py
Accepted
40
5600
177
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) a,b,c=sorted([a,b,c]) if (a**2)+(b**2)==(c**2): print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,015
s382897443
p00003
u167524059
1593410250
Python
Python3
py
Accepted
50
5596
204
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 == c**2 + a**2 or c**2 == a**2 + b**2 : print("YES") else : print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,016
s671193885
p00003
u413645175
1593308803
Python
Python3
py
Accepted
40
5640
238
n = int(input()) for i in range(n): a, b, c = map(int, input().split()) d = 2 e = 1/2 if (a**d+b**d)**e == c or (a**d+c**d)**e == b or (c**d+b**d)**e == a: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,017
s725857912
p00003
u355413291
1592876071
Python
Python3
py
Accepted
40
5596
197
n=int(input()) for i in range(n): a,b,c=map(int,input().split()) d=[a,b,c] d=sorted(d) if d[0]**2+d[1]**2 == d[2]**2 : print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,018
s370233871
p00003
u293306835
1592874621
Python
Python3
py
Accepted
40
5596
273
N=int(input()) for i in range(0,N): a,b,c=map(int,input().split()) if a**2==b**2+c**2: print("YES") elif b**2==a**2+c**2: print("YES") else: if c**2==a**2+b**2: print("YES") else: print("NO") i+=1
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,019
s555974798
p00003
u037566157
1592818046
Python
Python3
py
Accepted
40
5596
174
N=int(input()) for i in range(N): a=list(map(int,input().split())) a.sort() if a[2]*a[2]==a[1]*a[1]+a[0]*a[0]: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,020
s848969058
p00003
u554271288
1592813460
Python
Python3
py
Accepted
40
5596
199
N=int(input()) for i in range (1,N+1): a,b,c=map(int,input().split()) x=max(a,b,c) y=min(a,b,c) z=a+b+c-x-y if x**2==y**2+z**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,021
s015958747
p00003
u755480664
1592723118
Python
Python3
py
Accepted
40
5596
234
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")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,022
s305360213
p00003
u905454643
1592717033
Python
Python3
py
Accepted
40
5660
242
import math as m N=int(input()) for i in range(N): a,b,c=map(int,input().split()) A = min(a,min(b,c)) C = max(a,max(b,c)) B = a+b+c-A-C r=m.sqrt(A**2+B**2) if C == r: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,023
s548146679
p00003
u251716708
1592357424
Python
Python3
py
Accepted
40
5596
237
n = int(input()) for i in range(n): a,b,c = map(int,input().split()) if a>b: a,b=b,a if b>c: b,c=c,b if a>b: a,b=b,a if(a**2 + b**2 == c**2): print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,024
s246464682
p00003
u361745995
1592270130
Python
Python3
py
Accepted
40
5596
430
i=1 n=int(input()) for i in range(1,n+1): a,b,c=map(int,input().split()) if a==0 or b==0 or c==0: break else: if a>b: a,b=b,a else: a,b=a,b if b>c: b,c=c,b else: b,c=b,c if a>b: a,b=b,a else: a,b=a,b if a**2+b**2==c**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,025
s723019544
p00003
u680047335
1592268651
Python
Python3
py
Accepted
40
5600
264
#Volume0-0003 n = int(input()) for a in range(n): x,y,z = (input().split()) x = int(x) y = int(y) z = int(z) for a in range (3): if x > y: x,y = y,x if y > z: y,z = z,y if z**2 == x**2+y**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,026
s240272766
p00003
u329155726
1592266832
Python
Python3
py
Accepted
40
5592
128
for _ in range(int(input())): a, b, c = sorted(list(map(int, input().split()))) print("YES" if a**2 + b**2 == c**2 else "NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,027
s293936739
p00003
u869208015
1592213833
Python
Python3
py
Accepted
30
5596
230
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) if a>b: a,b=b,a if b>c: b,c=c,b if a>b: a,b=b,a if c**2-a**2-b**2==0: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,028
s741100321
p00003
u457539618
1592204260
Python
Python3
py
Accepted
50
5592
253
N=int(input()) for i in range(N): a,b,c=input().split() a=int(a) b=int(b) c=int(c) X=int(max(a,b,c)) Y=int(min(a,b,c)) Z=int(a+b+c-X-Y) if X**2 == Y**2 + Z**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,029
s969617089
p00003
u586171604
1592202019
Python
Python3
py
Accepted
40
5604
194
N = int(input()) for i in range(N): p = input() li = sorted([int(i) for i in p.split(" ")]) if li[-1]**2 == li[-2]**2 + li[-3]**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,030
s450857207
p00003
u826807985
1592198725
Python
Python3
py
Accepted
50
5596
248
N=int(input()) for i in range(N): x,y,z=map(int,input().split()) if x**2+y**2==z**2: print("YES") elif x**2+z**2==y**2: print("YES") elif y**2+z**2==x**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,031
s562346859
p00003
u900012957
1592198421
Python
Python3
py
Accepted
40
5596
161
for i in range(int(input())): x,y,z = sorted(list(map(int, input().split()))) if x**2 + y**2 == z**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,032
s434152615
p00003
u187074069
1592185595
Python
Python3
py
Accepted
40
5600
213
num = int(input()) for i in range(num): lst = list(map(int, input().split())) lst.sort() a, b, c = lst[0], lst[1], lst[2] if c**2 == a**2 + b**2: print('YES') else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,033
s614472501
p00003
u645087541
1592183457
Python
Python3
py
Accepted
40
5592
193
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')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,034
s952247635
p00003
u412088763
1592123544
Python
Python3
py
Accepted
40
5600
232
input() while True: try: num=list(map(int,input().split())) num.sort() if num[2]**2==num[0]**2+num[1]**2: print("YES") else: print("NO") except EOFError: break
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,035
s876100335
p00003
u529477970
1592095771
Python
Python3
py
Accepted
40
5660
219
import math N=int(input()) for i in range(N): a,b,c=map(int, input().split()) if c==math.sqrt(a**2+b**2) or b==math.sqrt(a**2+c**2) or a==math.sqrt(c**2+b**2): print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,036
s209195449
p00003
u834258010
1591961283
Python
Python3
py
Accepted
40
5660
218
import math N=int(input()) for i in range(N): a,b,c=map(int,input().split()) if c==math.sqrt(a**2+b**2) or a==math.sqrt(c**2+b**2) or b==math.sqrt(a**2+c**2): print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,037
s224587949
p00003
u390052013
1591959355
Python
Python3
py
Accepted
40
5612
222
def solve(): n = int(input()) for _ in range(n): a, b, c = sorted([int(i) for i in input().split()]) if a**2 + b**2 == c**2: print("YES") else: print("NO") solve()
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,038
s679615831
p00003
u925445050
1591710962
Python
Python3
py
Accepted
40
5600
191
N=int(input()) for i in range(N): a,b,c=sorted(map(int,input().split())) if a**2+b**2==c**2 or a**2+c**2==b**2 or b**2+c**2==a**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,039
s144462860
p00003
u630948380
1591666795
Python
Python3
py
Accepted
40
5596
273
N=int(input()) for i in range(0,N): x,y,z=map(int,input().split()) if x**2==y**2+z**2: print("YES") elif y**2==x**2+z**2: print("YES") else: if z**2==x**2+y**2: print("YES") else: print("NO") i+=1
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,040
s359450870
p00003
u438043982
1591666512
Python
Python3
py
Accepted
40
5604
181
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")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,041
s092233139
p00003
u350481745
1591666265
Python
Python3
py
Accepted
40
5596
170
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')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,042
s752860648
p00003
u976648183
1591663346
Python
Python3
py
Accepted
40
5604
253
n = int(input() ) for i in range(n): a, b, c = [int(x) for x in input().split()] if (b > a): a, b = b, a if (c > a): a, c = c, a #a = max if (b*b + c*c - a*a == 0): print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,043
s958061777
p00003
u644959375
1591606574
Python
Python3
py
Accepted
40
5596
204
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) A=min(a,min(b,c)) C=max(a,max(b,c)) B=a+b+c-A-C if A**2+B**2==C**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,044
s473981262
p00003
u627612495
1591601083
Python
Python3
py
Accepted
40
5596
251
N = int(input()) for i in range(N): a,b,c = map(int,input().split()) if a*a == b*b + c*c: print('YES') elif b*b == a*a + c*c: print('YES') elif c*c == a*a + b*b: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,045
s850405620
p00003
u661628543
1591598152
Python
Python3
py
Accepted
30
5596
297
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) A=a*a B=b*b C=c*c if a>b and a>c and A==B+C: print('YES') elif b>a and b>c and B==A+C: print('YES') elif c>a and c>b and C==A+B: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,046
s388936153
p00003
u034153923
1591591960
Python
Python3
py
Accepted
40
5600
165
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")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,047
s271963879
p00003
u573698742
1591581836
Python
Python3
py
Accepted
40
5596
156
N=int(input()) for i in range(N): a,b,c=sorted(map(int, input().split())) if a*a + b*b == c*c : print("YES") else : print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,048
s239618264
p00003
u685887060
1591256222
Python
Python3
py
Accepted
40
5592
199
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) if (a**2+b**2)==c**2 or (a**2+c**2)==b**2 or (c**2+b**2)==a**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,049
s784097414
p00003
u722264914
1591235223
Python
Python3
py
Accepted
30
5592
163
N = int(input()) for i in range(N) : vertex=sorted(map(int,input().split(" "))) if vertex[0]**2+vertex[1]**2==vertex[2]**2 : print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,050
s681721879
p00003
u245861861
1591094922
Python
Python3
py
Accepted
40
5720
255
s=int(input()) jon=[] while True: try: jon.append(input()) except: break for i in jon: pon=sorted(list(map(int,i.split())),reverse=True) if pon[0]**2==pon[1]**2+pon[2]**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,051
s826912376
p00003
u053015104
1591077491
Python
Python3
py
Accepted
40
5592
192
N=int(input()) for i in range(N): a,b,c = map(int,input().split()) A=a*a B=b*b C=c*c if A+B==C or A+C==B or B+C==A: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,052
s070907588
p00003
u673183698
1591061618
Python
Python3
py
Accepted
40
5592
166
N=int(input()) for i in range(N): n=list(map(int,input().split())) n.sort() if n[0]*n[0]+n[1]*n[1]==n[2]*n[2]: print('YES') else:print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,053
s530285107
p00003
u275486335
1591061499
Python
Python3
py
Accepted
40
5596
234
i=int(input()) for j in range(i): a,b,c=map(int,input().split()) d=[a,b,c] list=sorted(d) x=int(list[0]) y=int(list[1]) z=int(list[2]) if x**2+y**2==z**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,054
s899357644
p00003
u221550784
1591058015
Python
Python3
py
Accepted
40
5600
225
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) if a>b: a,b=b,a if b>c: b,c=c,b if a>b: a,b=b,a if a*a+b*b==c*c: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,055
s589021250
p00003
u257570657
1591024215
Python
Python3
py
Accepted
40
5596
182
n=int(input()) for i in range(n): a,b,c=map(int,input().split()) if a**2+b**2==c**2 or a**2+c**2==b**2 or b**2+c**2==a**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,056
s060142609
p00003
u444626963
1591001234
Python
Python3
py
Accepted
30
5596
213
for i in range ( int ( input ( ) ) ): a,b,c = map(int, input().split()) if a == 0 and b == 0: break 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")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,057
s237099106
p00003
u442912414
1590996403
Python
Python3
py
Accepted
40
5596
180
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")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,058
s009534979
p00003
u037263780
1590994314
Python
Python3
py
Accepted
40
5592
187
n=int(input()) for i in range(1,n+1): x,y,z=map(int,input().split()) if x**2+y**2==z**2 or y**2+z**2==x**2 or z**2+x**2==y**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,059
s069996492
p00003
u056263240
1590989468
Python
Python3
py
Accepted
40
5596
165
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")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,060
s860392792
p00003
u711365732
1590988941
Python
Python3
py
Accepted
30
5600
199
N = int(input()) for i in range(N): a,b,c = map(int, input().split()) A = a**2 B = b**2 C = c**2 if A+B==C or A+C==B or B+C==A: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,061
s804886884
p00003
u497248335
1590988778
Python
Python3
py
Accepted
40
5592
134
for _ in range(int(input())): a, b, c = sorted(list(map(int, input().split()))) print("YES" if a**2 + b**2 == c**2 else "NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,062
s263042092
p00003
u838993229
1590986919
Python
Python3
py
Accepted
40
5596
160
N = int(input()) for i in range(N): a,b,c = sorted(map(int,input().split())) if a**2 + b**2 == c**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,063
s318003154
p00003
u596129030
1590985917
Python
Python3
py
Accepted
40
5600
234
n=int(input()) for i in range(n): a,b,c=map(int,input().split()) if a*a==b*b+c*c: print("YES") elif b*b==a*a+c*c: print("YES") elif c*c==a*a+b*b: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,064
s196404901
p00003
u514242733
1590909876
Python
Python3
py
Accepted
40
5592
186
n=input() n=int(n) for i in range(n): a,b,c=map(int,input().split()) if a**2+b**2==c**2 or a**2+c**2==b**2 or b**2+c**2==a**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,065
s504001931
p00003
u795882061
1590845722
Python
Python3
py
Accepted
40
5600
178
N = int(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')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,066
s395940307
p00003
u919773430
1590758933
Python
Python3
py
Accepted
50
5592
264
x = int(input()) for i in range(x): a , b , c = list(map(int,input().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")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,067
s557255036
p00003
u333382219
1590633101
Python
Python3
py
Accepted
40
5592
146
N = int(input()) for i in range(N): a, b, c = sorted(map(int, input().split())) if a*a + b*b == c*c: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,068
s172418357
p00003
u662362547
1590590280
Python
Python3
py
Accepted
40
5608
128
for i in range(int(input())): a,b,c=sorted([int(i) for i in input().split()]) print('YES' if a**2+b**2==c**2 else 'NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,069
s259516694
p00003
u574841425
1590579213
Python
Python3
py
Accepted
30
5596
425
i=0 N=int(input()) for i in range(N): i+=1 a,b,c=map(int,input().split()) if a>=c and a>=b: if a**2==b**2+c**2: print('YES') else: print('NO') elif b>=a and b>=c: if b**2==a**2+c**2: print('YES') else: print('NO') elif c>=a and c>=b: if c**2==a**2+b**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,070
s103440745
p00003
u868891301
1590556577
Python
Python3
py
Accepted
40
5600
239
n=int(input()) for i in range(n): a,b,c=map(int,input().split()) if a*a+b*b == c*c : print("YES") elif b*b+c*c == a*a : print("YES") elif c*c+a*a == b*b : print("YES") else : print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,071
s787074997
p00003
u874049078
1590503378
Python
Python3
py
Accepted
30
5592
248
n = int(input()) for i in range(n): a, b, c = map(int, input().split()) if a*a + b*b == c*c: print('YES') elif a*a + c*c == b*b: print('YES') elif b*b + c*c == a*a: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,072
s400417005
p00003
u206985725
1590503288
Python
Python3
py
Accepted
40
5596
270
n=int(input()) for i in range(n): x,y,z=map(int,input().split()) a=x**2 b=y**2 c=z**2 if c==(a+b): print('YES') elif b==(a+c): print('YES') elif a==(b+c): print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,073
s937103631
p00003
u695386605
1590499160
Python
Python3
py
Accepted
40
5592
180
N = int(input()) for i in range (N): 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')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,074
s944614916
p00003
u397004753
1590456457
Python
Python3
py
Accepted
40
5596
142
N=int(input()) for i in range(1,N+1): x,y,z=sorted(map(int,input().split())) if x**2+y**2==z**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,075
s236389855
p00003
u259416836
1590456236
Python
Python3
py
Accepted
40
5600
187
n=int(input()) for i in range(n): a,b,c=map(int,input().split()) x=[a,b,c] x=sorted(x) if x[2]**2 == x[0]**2 + x[1]**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,076
s771783733
p00003
u799752967
1590455867
Python
Python3
py
Accepted
50
5592
182
N=int(input()) for i in range(N): x,y,z=map(int,input().split()) if x**2+y**2==z**2 or y**2+z**2==x**2 or z**2+x**2==y**2: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,077
s184887331
p00003
u179629761
1590415424
Python
Python3
py
Accepted
30
5596
121
n=int(input()) for i in range(n): a,b,c=sorted(map(int,input().split())) print("YES"if a**2+b**2==c**2 else"NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,078
s710225339
p00003
u064625546
1590403632
Python
Python3
py
Accepted
50
5596
234
n=int(input()) i=0 for i in range(n): a,b,c=map(int,input().split()) if a>b: a,b=b,a if b>c: b,c=c,b if a>b: a,b=b,a if a**2+b**2==c**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,079
s042139185
p00003
u320921262
1590390692
Python
Python3
py
Accepted
40
5604
234
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) if a>b: a,b=b,a if b>c: b,c=c,b if a>b: a,b=b,a if (a**2)+(b**2)==(c**2): print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,080
s905153083
p00003
u506949161
1590389781
Python
Python3
py
Accepted
40
5600
251
n=int(input()) for i in range(n): 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 a**2+c**2==b**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,081
s223198773
p00003
u931484744
1590386436
Python
Python3
py
Accepted
40
5604
282
# coding: utf-8 # Your code here! N = int(input()) for i in range(N): a, b, c = map(int, input().split()) if a > b: a, b = b, a if b > c: b, c = c, b if a > b: a, b = b, a if c * c - a * a - b * b == 0: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,082
s584949901
p00003
u138194441
1590384295
Python
Python3
py
Accepted
40
5592
146
T = int(input()) for x in range(0,T) : a = sorted(map(int,input().split())) if a[0]**2+a[1]**2 == a[2]**2 : print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,083
s434635396
p00003
u511292942
1590382640
Python
Python3
py
Accepted
40
5600
176
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')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,084
s919679699
p00003
u455994792
1590333201
Python
Python3
py
Accepted
40
5592
256
N=int(input()) i=1 t=0 while i<N+1: a,b,c=map(int,input().split()) if a>b: t=a;a=b;b=t if b>c: t=b;b=c;c=t if a>b: t=a;a=b;b=t if a*a + b*b == c*c: print("YES") else: print("NO") i=i+1
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,085
s398429394
p00003
u994684803
1590243677
Python
Python3
py
Accepted
40
5596
191
n=int(input()) for i in range(n): a,b,c=map(int,input().split()) if c**2 == a**2+b**2 or b**2 == a**2+c**2 or a**2 == c**2+b**2 : print("YES") else : print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,086
s910206937
p00003
u747536722
1590228829
Python
Python3
py
Accepted
30
5712
367
list_a=[] list_b=[] list_c=[] N=int(input()) for i in range(N): a,b,c=map(int,input().split()) list_a.append(a) list_b.append(b) list_c.append(c) for i in range(N): list_a[i],list_b[i],list_c[i]=sorted([list_a[i],list_b[i],list_c[i]]) x=list_a[i] y=list_b[i] z=list_c[i] if x**2+y**2==z**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,087
s655518961
p00003
u918533241
1589852268
Python
Python3
py
Accepted
40
5592
164
x=int(input()) for i in range(x): a,b,c=sorted(list(map(int,input().split()))) if (a**2)+(b**2)==(c**2): print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,088
s055798380
p00003
u695568874
1589851842
Python
Python3
py
Accepted
40
5596
230
N=int(input()) for i in range(N): a,b,c=map(int,input().split()) if a*a==b*b+c*c: print("YES") elif b*b==a*a+c*c: print("YES") elif c*c==a*a+b*b: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,089
s204233782
p00003
u427834127
1589848420
Python
Python3
py
Accepted
40
5592
239
N=int(input()) for i in range (N): a,b,c=map(int,input().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")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,090
s166476403
p00003
u228556128
1589802165
Python
Python3
py
Accepted
40
5600
131
a=int(input()) for _ in range(a): x,y,z=sorted(list(map(int,input().split()))) print("YES" if x**2+y**2==z**2 else "NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,091
s342000151
p00003
u371026526
1589786209
Python
Python3
py
Accepted
40
5600
315
N = int(input()) i=0 while i < N: x,y,z = map(int,input().split()) if x<=z and y<=z: if z**2 == x**2+y**2: print("YES") else: print("NO") elif x<=y and z<=y: if y**2 == x**2+z**2: print("YES") else: print("NO") else: if x**2 == y**2+z**2: print("YES") else: print("NO") i += 1
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,092
s606057169
p00003
u419548414
1589785550
Python
Python3
py
Accepted
50
5596
312
a=int(input()) for i in range(a): x,y,r=map(int,input().split()) l=[] l.append(x) l.append(y) l.append(r) for t in range(2): if l[t]>l[t+1]: l[t],l[t+1]=l[t+1],l[t] if (l[0]**2)+(l[1]**2)==l[2]**2: print("YES") else: print("NO") del l
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,093
s978555906
p00003
u470391435
1589778442
Python
Python3
py
Accepted
40
5596
298
def san(a,b,c): if (a**2)==(b**2)+(c**2): print('YES') elif (b**2)==(a**2)+(c**2): print('YES') elif (c**2)==(b**2)+(a**2): print('YES') else: print('NO') N = int(input()) for i in range(N): x, y, z = map(int,input().split()) san(x,y,z)
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,094
s340076501
p00003
u705625724
1589778077
Python
Python3
py
Accepted
40
5596
232
# coding: utf-8 # Your code here! N = int(input()) for i in range(N): a,b,c = map(int,input().split()) a = a*a b = b*b c = c*c if a==b+c or b==a+c or c==a+b: print('YES') else: print('NO')
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,095
s108543383
p00003
u192469946
1589778039
Python
Python3
py
Accepted
40
5596
349
#volume0 0003 N = int(input()) for i in range(N): x , y , z= map(int,input().split()) if x > y: min = x x = y y = min if y > z: mid = y y = z z = mid if x > y: min = x x = y y = min if z**2 == x**2 + y**2: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,096
s246889477
p00003
u894788865
1589766943
Python
Python3
py
Accepted
40
5592
168
n = int(input()) for i in range(n): a,b,c=map(int,input().split()) a=a*a b=b*b c=c*c if a+b==c or a+c==b or b+c==a: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,097
s416858954
p00003
u904289400
1589688362
Python
Python3
py
Accepted
40
5596
287
i=1 N=int(input()) while i<=N: x,y,z=map(int,input().split()) if x**2+y**2==z**2: print('YES') i+=1 elif y**2+z**2==x**2: print('YES') i+=1 elif x**2+z**2==y**2: print('YES') i+=1 else: print('NO') i+=1
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,098
s812393444
p00003
u171326376
1589687925
Python
Python3
py
Accepted
40
5600
262
N = int(input()) i = 1 for i in range(1,N+1): a,b,c = map(int,input().split()) if a>b: a,b = b,a if b>c: b,c = c,b if a>c: a,c = c,a if a**2+b**2 == c**2: print('YES') else: print('NO') i += 1
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,099
s546942658
p00003
u677563181
1589628894
Python
Python3
py
Accepted
40
5596
194
x=int(input()) for i in range(x): a, b, c=list(map(int ,input().split())) s=[a**2,b**2,c**2] t=sorted(s) if t[0]+t[1]==t[2]: print("YES") else: print("NO")
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,100
s767796219
p00003
u577978368
1589626532
Python
Python3
py
Accepted
40
5592
235
n=int(input()) i=0 while i<n: a,b,c=map(int,input().split()) if a*a+b*b==c*c: print("YES") elif a*a+c*c==b*b: print("YES") elif b*b+c*c==a*a: print("YES") else: print("NO") i=i+1
p00003
<H1>Is it a Right Triangle?</H1> <p> Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so. </p> <H2>Input</H2> <p> Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space. </p> <h2>Constraints</h2> <ul> <li> 1 &le; length of the side &le; 1,000</li> <li> <var>N</var> &le; 1,000</li> </ul> <H2>Output</H2> <p> For each data set, print "<span>YES</span>" or "<span>NO</span>". </p> <H2>Sample Input</H2> <pre> 3 4 3 5 4 3 6 8 8 8 </pre> <H2>Output for the Sample Input</H2> <pre> YES NO NO </pre>
3 4 3 5 4 3 6 8 8 8
YES NO NO
3,101