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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s715135596
|
p00003
|
u981910313
|
1589593196
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 181
|
i=0
N=int(input())
while i<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')
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,102
|
s444202535
|
p00003
|
u747915832
|
1589553247
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5596
| 347
|
N = int(input())
for i in range(N):
a, b, c = map(int, input().split())
list = [a, b, c]
for j in range(2,0,-1):
for k in range(j):
if list[k]<list[k+1]:
list[k], list[k+1] = list[k+1], list[k]
if (list[0])**2 == (list[1])**2 + (list[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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,103
|
s878149119
|
p00003
|
u322947441
|
1589505725
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 494
|
N = int(input())
for i in range(N):
x,y,z = map(int,input().split())
if x>y and x>z:
s = y**2+z**2
u = x**2
if s==u:
print("YES")
else:
print("NO")
elif y>x and y>z:
s = x**2+z**2
u = y**2
if s==u:
print("YES")
else:
print("NO")
else:
s = x**2+y**2
u = z**2
if s==u:
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,104
|
s542875728
|
p00003
|
u593595530
|
1589439529
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,105
|
s800764460
|
p00003
|
u290304811
|
1589357764
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 157
|
n = int(input())
for _ 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,106
|
s173677653
|
p00003
|
u253463111
|
1589356848
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 174
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,107
|
s413096582
|
p00003
|
u991830357
|
1589339981
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 242
|
N=int(input())
i=0
while i<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')
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,108
|
s029530087
|
p00003
|
u140569607
|
1589337014
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 299
|
n = int(input())
for i in range(n):
a,b,c = map(int, input().split())
if c > a and c > b and a*a+b*b == c*c:
print("YES")
elif b > a and b> c and a*a+c*c == b*b:
print("YES")
elif a > b and a > c and 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,109
|
s760467639
|
p00003
|
u511744190
|
1589336924
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 332
|
n=int(input())
while True:
try:
a=list(map(int,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')
except:
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,110
|
s904813142
|
p00003
|
u162292165
|
1589291821
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 182
|
x=int(input())
for i in range(x):
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,111
|
s761280904
|
p00003
|
u895962529
|
1589245267
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,112
|
s512246520
|
p00003
|
u177648086
|
1589202450
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5600
| 183
|
n=int(input())
for i in range(1,n+1):
a,b,c=map(int,input().split())
if a*a+b*b == c*c or b*b+c*c == a*a or c*c+a*a == b*b:
print('YES')
else:
print('NO')
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,113
|
s076268485
|
p00003
|
u753534330
|
1589193698
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 213
|
i = 0
n = int(input())
for i in range(n):
x, y, z = map(int, input().split())
if x**2 + y**2 == z**2 or x**2 + z**2 == y**2 or 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,114
|
s438751828
|
p00003
|
u862272701
|
1589101538
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5652
| 274
|
import math
N = int(input())
i = 1
while i <= 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")
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,115
|
s896771553
|
p00003
|
u926092389
|
1589098110
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5592
| 244
|
N=int(input())
for i in range(N) :
x,y,z=map(int,input().split())
if x**2==z**2+y**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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,116
|
s834569313
|
p00003
|
u435414815
|
1589044060
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5592
| 212
|
x=input()
i=0
while int(x)>i :
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if a*a==b*b+c*c or b*b==c*c+a*a or c*c==b*b+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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,117
|
s164853039
|
p00003
|
u395654950
|
1589007638
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 284
|
# 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,118
|
s154602291
|
p00003
|
u988962397
|
1588998305
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5600
| 213
|
n=int(input())
i=1
while i<=n:
a,b,c=map(int, input().split())
if a<b:
a,b=b,a
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,119
|
s011438865
|
p00003
|
u583329397
|
1588941622
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 178
|
N=int(input())
i=0
while i<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')
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,120
|
s012352199
|
p00003
|
u173393391
|
1588938198
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 194
|
r=int(input())
for x in range(r):
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,121
|
s367928982
|
p00003
|
u057249340
|
1588923042
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 186
|
n=int(input())
for _ in range(n):
a,b,c=map(int,input().split())
if a**2+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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,122
|
s181342602
|
p00003
|
u350963229
|
1588896463
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 293
|
n=int(input())
for i in range(n):
l=list(map(int,input().split()))
if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]:
print("YES")
elif l[2]*l[2]+l[1]*l[1] == l[0]*l[0]:
print("YES")
elif l[0]*l[0]+l[2]*l[2] == l[1]*l[1]:
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,123
|
s793501338
|
p00003
|
u884758681
|
1588832690
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 241
|
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>c:
a,c=c,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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,124
|
s107435454
|
p00003
|
u647921435
|
1588817290
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,125
|
s507454026
|
p00003
|
u128671689
|
1588748439
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 182
|
N=int(input())
for i in range(N):
x,y,z=map(int,input().split())
if x**2+y**2==z**2 or x**2+z**2==y**2 or z**2+y**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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,126
|
s175637258
|
p00003
|
u240091169
|
1588727815
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5600
| 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,127
|
s752964396
|
p00003
|
u260980560
|
1588727756
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 135
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,128
|
s219395074
|
p00003
|
u288578617
|
1588699680
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5592
| 200
|
n=int(input())
for i in range(1,n+1):
x, y, z=map(int,input().split())
if x*x==y*y+z*z or y*y==x*x+z*z or z*z==x*x+y*y:
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,129
|
s749272873
|
p00003
|
u095087680
|
1588488368
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5716
| 291
|
result = []
N = int(input())
for i in range(N):
A = list(map(int, input().split()))
chk_Num = sorted(A, reverse=True)
if (chk_Num[1] ** 2 + chk_Num[2] ** 2) == (chk_Num[0] ** 2):
result.append("YES")
else:
result.append("NO")
for i in result:
print(i)
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,130
|
s552552198
|
p00003
|
u014861569
|
1588428510
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 259
|
N=int(input())
for i in range(1,N+1):
x,y,z=input().split()
x=int(x)
y=int(y)
z=int(z)
if x>y:
x,y=y,x
if y>z:
y,z=z,y
if x>y:
x,y=y,x
if x*x+y*y==z*z:
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,131
|
s763951577
|
p00003
|
u842461513
|
1588297779
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5980
| 405
|
n=int(input())
a=[]
c=[]
for i in range(n):
a.append([])
for j in range(3):
a[i].append([])
for i in range(n):
#for j in range(3):
a[i][0], a[i][1], a[i][2]=map(int, input().split())
a[i].sort()
if(((a[i][0]*a[i][0])+(a[i][1]*a[i][1]))==(a[i][2]*a[i][2])):
k="YES"
c.append(k)
else:
k="NO"
c.append(k)
for i in range(n):
print(c[i])
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,132
|
s610003581
|
p00003
|
u235330043
|
1588084642
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5592
| 142
|
count= int(input())
for i in range(count):
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,133
|
s048327435
|
p00003
|
u352646821
|
1588039273
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 188
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,134
|
s844308707
|
p00003
|
u037441960
|
1587998679
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 241
|
N = int(input())
for i in range(N) :
a, b, c = map(int, input().split())
L = [a, b, c]
m = L.pop(L.index(max(L)))
s = L[0] ** 2 + L[1] ** 2
if m ** 2 == s :
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,135
|
s613216816
|
p00003
|
u814278309
|
1587828093
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5592
| 159
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,136
|
s308204798
|
p00003
|
u374434600
|
1586622030
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 254
|
import sys
i=0
N=int(input())
while i<N:
a,b,c= map(int, input().split())
a2=a*a
b2=b*b
c2=c*c
if(a2==b2+c2 or b2==a2+c2 or c2==b2+a2):
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,137
|
s547422971
|
p00003
|
u744927780
|
1586620888
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5668
| 304
|
loop_len = int(input())
import math
for i in range(loop_len):
l=list(map(int,input().split()))
if math.hypot(l[0],l[1])==l[2]:
print('YES')
elif math.hypot(l[1],l[2])==l[0]:
print('YES')
elif math.hypot(l[2],l[0])==l[1]:
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,138
|
s925987214
|
p00003
|
u713674793
|
1586595482
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5724
| 224
|
n = int(input())
ans = []
for i in range(n):
a = list(map(int, input().split()))
a = sorted(a)
if a[0]**2 + a[1]**2 == a[2]**2:
ans.append('YES')
else:
ans.append('NO')
print(*ans, sep='\n')
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,139
|
s125490097
|
p00003
|
u230927103
|
1586079924
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5600
| 164
|
for __ in range(int(input())):
a, b, c = sorted(list(map(int, input().split())))
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,140
|
s517566290
|
p00003
|
u490578380
|
1584684933
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 286
|
def judgeTriangle(a, b, c):
if c * c == a * a + b * b:
result = 'YES'
else:
result = 'NO'
return result
for i in range(int(input())):
numList = list(map(int, input().split()))
numList.sort()
a, b, c = numList
print(judgeTriangle(a, b, c))
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,141
|
s389705010
|
p00003
|
u123017074
|
1584517049
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 256
|
n = int(input())
for _ in range(n):
triangle = list(map(int, input().split()))
triangle = list(reversed(sorted(triangle)))
if (triangle[0] ** 2) == ((triangle[1] ** 2) + (triangle[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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,142
|
s274017191
|
p00003
|
u998478961
|
1584361762
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5600
| 257
|
time = int(input())
while time > 0 :
a,b,c = (int(x) for x in 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")
time -= 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,143
|
s017392943
|
p00003
|
u808372529
|
1583661338
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 185
|
n = int(input())
for i in range(n):
a = list(map(int,input().split()))
a = sorted(a)
if 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,144
|
s951085848
|
p00003
|
u642972715
|
1582101448
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 247
|
input()
try:
while True:
a, b, c = map(int, input().split())
if (a**2 == b**2 + c**2) or (b**2 == a**2 + c**2) or (c**2 == b**2 + a**2) :
print("YES")
else:
print("NO")
except EOFError:
pass
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,145
|
s365574522
|
p00003
|
u701163915
|
1581514322
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5752
| 172
|
N=int(input())
l=[list(map(int,input().split())) for i in range(N)]
for i in l:
i.sort()
if (i[-1])**2 == (i[-2])**2 + (i[-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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,146
|
s057480431
|
p00003
|
u011621222
|
1581083056
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5660
| 295
|
t = int(input())
i = 0
def Right_Tri(m,n,o):
a = (n**2+o**2)**(0.5)
if m == a:
return True
while(i<t):
m,n,o = map(int, input().split())
if (Right_Tri(m,n,o) or Right_Tri(n,o,m) or Right_Tri(o,m,n) == True):
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,147
|
s999097069
|
p00003
|
u617401892
|
1576247801
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5976
| 265
|
N = int(input())
array = []
for _ in range(0, N):
array.append(map(int, input().split(' ')))
for a, b, c in array:
a = a ** 2
b = b ** 2
c = c ** 2
if a + b == c or b + c == a 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,148
|
s144042222
|
p00003
|
u630911389
|
1575953127
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5608
| 420
|
while True:
try:
num = int(input())
for i in range(num):
lengths = (int(x) for x in input().split())
sortLengths = sorted(lengths)
if(sortLengths[2] * sortLengths[2] == (sortLengths[1] * sortLengths[1]) + (sortLengths[0] * sortLengths[0])):
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,149
|
s627684646
|
p00003
|
u153447291
|
1574769514
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 172
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,150
|
s971818283
|
p00003
|
u297517978
|
1573379503
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 180
|
n=int(input())
for i in range(n):
t=list(map(int,input().split()))
t.sort()
a,b=t[0]**2+t[1]**2,t[2]**2
if a==b:
print("YES")
else:
print("NO")
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,151
|
s473253124
|
p00003
|
u933957884
|
1572660748
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5628
| 146
|
print("\n".join("YES" if max(x) * 2 == sum(x) else "NO" for _ in range(int(input())) for x in [list(map(lambda x: int(x)**2, input().split()))]))
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,152
|
s710088692
|
p00003
|
u635209856
|
1571405824
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 231
|
N=int(input())
for i in range(N):
sides=list(map(int,input().split()))
## print(sides)
sortsides=sorted(sides)
if sortsides[2]**2==sortsides[0]**2+sortsides[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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,153
|
s044628597
|
p00003
|
u128808587
|
1570657723
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 203
|
N = int(input())
for i in range(N):
point = list(map(int, input().split()))
point.sort()
if point[0] ** 2 + point[1] ** 2 == point[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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,154
|
s172225056
|
p00003
|
u803862921
|
1570537749
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 170
|
n = int(input())
for _ in range(n):
a, b, c = sorted([int(x) for x in input().split()])
if c*c == b*b + 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,155
|
s784684075
|
p00003
|
u852592538
|
1569676106
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 215
|
n = int(input())
for _ in range(n):
l = list(map(int, input().split()))
l.sort()
a = l[0]
b = l[1]
c = l[2]
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,156
|
s856202762
|
p00003
|
u447421429
|
1569578374
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5752
| 188
|
n=int(input())
r=[sorted(list(map(int,input().split()))) for _ in range(n)]
for i in range(n):
if r[i][0]**2+r[i][1]**2==r[i][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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,157
|
s109005555
|
p00003
|
u381304373
|
1568268962
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 328
|
N = int(input())
def check_right_triangle(l):
ans = ""
max_number = l.pop(l.index(max(l)))
if((max_number**2) == (l[0]**2+l[1]**2)):
return "YES"
else:
return "NO"
for i in range(N):
length_of_three_side = list(map(int,input().split()))
print(check_right_triangle(length_of_three_side ))
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,158
|
s721200592
|
p00003
|
u629170852
|
1567958555
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5752
| 200
|
n=int(input())
N=[]
for i in range(n):
N.append(list(map(int,input().split())))
for x,y,z in N:
if x**2+y**2==z**2 or x**2+z**2==y**2 or z**2+y**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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,159
|
s165823633
|
p00003
|
u813197825
|
1566221607
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 159
|
n = int(input())
for i in range(n):
num = list(map(int, input().split()))
num.sort()
print('YES' if num[0]**2 + num[1]**2 == num[2]**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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,160
|
s047239868
|
p00003
|
u824708460
|
1566135652
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 184
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,161
|
s757624521
|
p00003
|
u445425884
|
1564924728
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5612
| 99
|
for _ in[0]*int(input()):a,b,c=sorted(map(int,input().split()));print(['NO','YES'][a*a+b*b==c*c])
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,162
|
s276781851
|
p00003
|
u939401108
|
1564922979
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 164
|
T = int(input())
for tc 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,163
|
s525257537
|
p00003
|
u218784088
|
1564919293
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 164
|
N = int(input())
for i in range(N):
l = list(map(int,input().split()))
l.sort()
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,164
|
s850592174
|
p00003
|
u586792237
|
1564917972
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 164
|
N = int(input())
for i in range(N):
l = list(map(int,input().split()))
l.sort()
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,165
|
s842843172
|
p00003
|
u821561321
|
1564917750
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 148
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,166
|
s568405989
|
p00003
|
u455877373
|
1564896488
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 168
|
T = int(input())
for tc 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,167
|
s051304369
|
p00003
|
u108130680
|
1564758431
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 143
|
for _ in range(int(input())):
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,168
|
s446704111
|
p00003
|
u312033355
|
1564721961
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5600
| 216
|
def cyokkaku(a,b,c):
if a*a+b*b==c*c or b*b+c*c==a*a or c*c+a*a==b*b:
print("YES")
else:
print("NO")
n=int(input())
for i in range (n):
a,b,c=map (int,input().split())
cyokkaku(a,b,c)
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,169
|
s295150087
|
p00003
|
u433250944
|
1564678298
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 186
|
for i in range(int(input())):
tri = [int(i) for i in input().split(' ')]
tri.sort()
if tri[0]**2 + tri[1]**2 == tri[2]**2:
print('YES')
else:
print('NO')
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,170
|
s295730008
|
p00003
|
u212392281
|
1564578535
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5600
| 208
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,171
|
s982682662
|
p00003
|
u529337794
|
1564577842
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 167
|
T = int(input())
for tc 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,172
|
s516262258
|
p00003
|
u074302614
|
1564499068
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 186
|
n = int(input())
for i in range(n):
x = [int(i) for i in input().split()]
x.sort()
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,173
|
s786248850
|
p00003
|
u678843586
|
1563772301
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5608
| 99
|
for _ in[0]*int(input()):a,b,c=sorted(map(int,input().split()));print(['NO','YES'][a*a+b*b==c*c])
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,174
|
s576766671
|
p00003
|
u090921599
|
1563711947
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 162
|
for _ 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,175
|
s176158093
|
p00003
|
u001166815
|
1563509513
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 216
|
# coding: utf-8
n = int(input())
for i in range(n):
a,b,c = list(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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,176
|
s039533513
|
p00003
|
u052791913
|
1563257970
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5600
| 185
|
n = int(input())
for i in range(n):
a = [int(s) for s in input().split()]
a = sorted(a)
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,177
|
s734855319
|
p00003
|
u607723579
|
1563169600
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 168
|
n = int(input())
for i in range(n):
a,b,c=map(int,input().split())
l=[a,b,c]
list.sort(l)
if l[0]**2+l[1]**2==l[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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,178
|
s171546477
|
p00003
|
u397862444
|
1563166027
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5596
| 129
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,179
|
s511983156
|
p00003
|
u427219397
|
1562563837
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 177
|
for i in range(int(input())):
a = [int(i) for i in 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,180
|
s375375347
|
p00003
|
u051789695
|
1562040620
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5592
| 131
|
n=int(input())
for i in range(n):
a=sorted(map(int,input().split()))
print("YES" if (a[0]**2+a[1]**2)==a[2]**2 else "NO")
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,181
|
s055581335
|
p00003
|
u313600138
|
1561964345
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 179
|
n = int(input())
for i in range(n):
A =list(map(int,input().split()))
A.sort()
a=A[0]
b=A[1]
c=A[2]
if 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,182
|
s555595604
|
p00003
|
u013648252
|
1561960723
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,183
|
s571527071
|
p00003
|
u480501638
|
1561959964
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 135
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,184
|
s325532749
|
p00003
|
u997476941
|
1561959857
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,185
|
s110559867
|
p00003
|
u614095715
|
1560498831
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5756
| 201
|
data = []
for i in range(int(input())):
data.append(sorted(list(map(int, input().split()))))
for d in data:
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,186
|
s260735901
|
p00003
|
u264450287
|
1560324783
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 199
|
n=int(input())
for i in range(n):
triangle=list(map(int,input().split()))
triangle.sort(reverse=True)
if triangle[1]**2+triangle[2]**2==triangle[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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,187
|
s292376289
|
p00003
|
u800408401
|
1560145721
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 168
|
n = int(input())
for i in range(n):
a,b,c=map(int,input().split())
l=[a,b,c]
list.sort(l)
if l[0]**2+l[1]**2==l[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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,188
|
s496178945
|
p00003
|
u548252256
|
1560100344
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 204
|
if __name__ == '__main__':
n = int(input())
for _ in range(n):
n,m,s = map(int,input().split())
if n*n == m*m + s*s or m*m == n*n + s*s or s*s == m*m + n*n:
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,189
|
s439861175
|
p00003
|
u506537276
|
1559974998
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 162
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,190
|
s917668791
|
p00003
|
u555040407
|
1558857445
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5608
| 261
|
for i in range(int(input())):
data = input().split()
length = []
for j in range(3):
length.append(int(data[j]))
length.sort()
if (length[0]**2) + (length[1]**2) == (length[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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,191
|
s131608067
|
p00003
|
u567306474
|
1557594505
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5604
| 201
|
n = int(input())
for i in range(0,n):
s = [int(x) for x in input().split()]
s.sort()
s.reverse()
if(s[0] ** 2 == s[1] **2 + s[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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,192
|
s305842426
|
p00003
|
u904226154
|
1557212171
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 240
|
count = int(input())
for i in range(count):
numberList = list(map(int, input().split()))
numberList.sort()
if (numberList[0] ** 2) + (numberList[1] ** 2) == numberList[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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,193
|
s303890034
|
p00003
|
u406093358
|
1555461248
|
Python
|
Python
|
py
|
Accepted
| 10
|
4644
| 208
|
def judge(a, b, c):
if a*a + b*b == c*c: return 'YES'
else: return 'NO'
N = int(raw_input())
for i in range(0, N):
side = map(int, raw_input().split())
side.sort()
print judge(side[0], side[1], side[2])
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,194
|
s330101392
|
p00003
|
u979795132
|
1555076829
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5812
| 476
|
n = int(input())
length = [[]*3]*n
for i in range(n):
length[i] = input().split()
for i in range(n):
if int(length[i][0])**2 == int(length[i][1])**2 + int(length[i][2])**2:
print("YES")
continue
if int(length[i][1])**2 == int(length[i][2])**2 + int(length[i][0])**2:
print("YES")
continue
if int(length[i][2])**2 == int(length[i][0])**2 + int(length[i][1])**2:
print("YES")
continue
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,195
|
s145163126
|
p00003
|
u647694976
|
1554531648
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 158
|
N=int(input())
for i in range(N):
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,196
|
s420364923
|
p00003
|
u761923615
|
1554426062
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5592
| 159
|
N=int(input())
for i in range(N):
a,b,c=list(map(int,input().split()))
if a*a+b*b==c*c or a*a==b*b+c*c or a*a+c*c==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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,197
|
s318397013
|
p00003
|
u763386533
|
1553796443
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5596
| 189
|
n=int(input())
for i in range(n):
x=list(map(int,input().split()))
x.sort()
a=x[0]
b=x[1]
c=x[2]
if a*a+b*b==c*c:
print('YES')
else:
print('NO')
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,198
|
s210957859
|
p00003
|
u033958021
|
1553180711
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5720
| 289
|
# coding: utf-8
import sys
n = int(input())
for line in sys.stdin.readlines():
i = line.rstrip().split(' ')
a = pow(int(i[0]),2)
b = pow(int(i[1]),2)
c = pow(int(i[2]),2)
if ((a+b) == c) or ((b+c)==a) 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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,199
|
s753559648
|
p00003
|
u625806423
|
1551705249
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 160
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,200
|
s444100953
|
p00003
|
u314832372
|
1551161824
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5712
| 441
|
var1 = int(input()) + 1
list3 = []
for i in range(1, var1):
list3.append(input())
for m in range(0, var1-1):
str1 = list3[m]
list1 = str1.split(" ")
list1 = list(map(int, list1))
var2 = max(list1)
list1.remove(max(list1))
var2 = var2 * var2
var3 = list1[0]*list1[0]
var4 = list1[1]*list1[1]
if var4 + var3 == var2:
print("YES")
else:
print("NO")
list1.clear()
str1 = None
|
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 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 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,201
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.