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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s213807205 | p00003 | u894941280 | 1347477213 | Python | Python | py | Accepted | 20 | 4232 | 154 | count = int(input())
for i in range(count):
a = map(int,raw_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
| 2,902 |
s163552439 | p00003 | u788273968 | 1349177557 | Python | Python | py | Accepted | 20 | 4228 | 163 | n = int(input())
for i in range(n):
a, b, c = sorted(map(int, raw_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
| 2,903 |
s052091205 | p00003 | u881567576 | 1349227023 | Python | Python | py | Accepted | 20 | 38000 | 371 | line_num = int(raw_input())
for n in range(line_num):
a,b,c = map(int, raw_input().split(" "))
if a>b:
if a>c:
if a*a == b*b + c*c:
print "YES"
continue
else:
if c*c == a*a + b*b:
print "YES"
continue
else:
if b>c:
if b*b == a*a + c*c:
print "YES"
continue
else:
if c*c == a*a + b*b:
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
| 2,904 |
s077155739 | p00003 | u126791750 | 1350211321 | Python | Python | py | Accepted | 20 | 4232 | 229 | #coding:UTF-8
c = int(raw_input())
for i in range(0,c) :
n = map(int, raw_input().split())
n.sort()
if n[2]**2 == n[0]**2 + n[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
| 2,905 |
s399360263 | p00003 | u915761101 | 1350722724 | Python | Python | py | Accepted | 20 | 5452 | 203 | def ok(a,b,c):
return (a*a+b*b==c*c)
n=input()
for i in range(n):
a,b,c=map(int,raw_input().split())
if(ok(a,b,c) or ok(b,c,a) or ok(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
| 2,906 |
s651231733 | p00003 | u647766105 | 1350906257 | Python | Python | py | Accepted | 20 | 4236 | 169 | n=input()
for i in range(n):
a=map(lambda x: x**2,map(int,raw_input().split()))
a.sort()
if a[0]+a[1]==a[2]:
print "YES"
else:
print "NO" | p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,907 |
s440591139 | p00003 | u719737030 | 1350909421 | Python | Python | py | Accepted | 20 | 4228 | 190 | for i in range(int(raw_input())):
n = [int(x) for x in raw_input().split()]
n.sort(reverse=True)
if n[0]**2 == n[1]**2 + n[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
| 2,908 |
s745211034 | p00003 | u779627195 | 1352368651 | Python | Python | py | Accepted | 20 | 4244 | 347 | def pgr(x, y, z):
if x**2 + y**2 == z**2: return True
else: return False
while 1:
try:
n = input()
for i in range(n):
a,b,c = map(int, raw_input().split())
if (pgr(a,b,c) or pgr(b,c,a) or pgr(c,a,b)): print 'YES'
else: print 'NO'
break
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
| 2,909 |
s813927082 | p00003 | u504990413 | 1353138796 | Python | Python | py | Accepted | 20 | 4280 | 245 |
nums = input()
lines = [[]]*nums
for x in range(nums):
lines[x] = map(int, raw_input().split(' '))
for li in lines:
li.sort()
for li in lines:
if li[0]**2 + li[1]**2 == li[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
| 2,910 |
s619462382 | p00003 | u735362704 | 1354636863 | Python | Python | py | Accepted | 20 | 4260 | 358 | #!/usr/bin/env python
# coding: utf-8
def is_right_triangle(a, b, c):
return a ** 2 + b ** 2 == c ** 2
def main():
input_count = int(raw_input())
for i in xrange(input_count):
L = raw_input().split(" ")
L = map(long, L)
L.sort()
print ("NO", "YES")[is_right_triangle(*L)]
if __name__ == '__main__':
main() | 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
| 2,911 |
s736957343 | p00003 | u647766105 | 1354799974 | Python | Python | py | Accepted | 20 | 5268 | 166 | for i in xrange(input()):
a=map(lambda x: x**2,map(int,raw_input().split()))
a.sort()
if a[0]+a[1]==a[2]:
print "YES"
else:
print "NO" | p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,912 |
s191915122 | p00003 | u419407022 | 1355293480 | Python | Python | py | Accepted | 20 | 5732 | 174 | for i in range(int(raw_input())):
a, b, c = [int(j) ** 2 for j in raw_input().split()]
if a+b==c or a+c==b or b+c==a:
print 'YES'
else:
print 'NO' | p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,913 |
s561222946 | p00003 | u560838141 | 1356705803 | Python | Python | py | Accepted | 20 | 4232 | 189 | n = input()
for i in range(n):
l = map(int, raw_input().strip().split(" "));
l.sort();
if (l[2] ** 2 == l[1] ** 2 + l[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
| 2,914 |
s862143635 | p00003 | u665962315 | 1357421495 | Python | Python | py | Accepted | 10 | 4236 | 280 | for i in range(int(raw_input())):
sides = map(int, raw_input().split())
if sides[0]**2 == sides[1]**2 + sides[2]**2 or\
sides[1]**2 == sides[2]**2 + sides[0]**2 or\
sides[2]**2 == sides[0]**2 + sides[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
| 2,915 |
s383064145 | p00003 | u560838141 | 1357555326 | Python | Python | py | Accepted | 20 | 4228 | 145 | x = int(input())
for a in range(x):
y = map(int,raw_input().split())
y.sort()
if y[2]**2-y[1]**2 == y[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
| 2,916 |
s363885895 | p00003 | u378761086 | 1360424009 | Python | Python | py | Accepted | 20 | 4236 | 220 | #!/usr/bin/python
import sys
t = raw_input()
for i in range(int(t)):
x = [int(s) for s in raw_input().split()]
x.sort()
if x[0] ** 2 + x[1] ** 2 == x[2] ** 2:
print "YES"
else:
print "NO" | p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,917 |
s088120363 | p00003 | u782850731 | 1361767540 | Python | Python | py | Accepted | 20 | 4304 | 268 | from __future__ import absolute_import, print_function, unicode_literals
import sys
def judge(a, b, c):
print('YES' if (a == b + c or b == c + a or c == a + b) else 'NO')
sys.stdin.readline()
for line in sys.stdin:
judge(*(int(n) ** 2 for n in line.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
| 2,918 |
s354578548 | p00003 | u894941280 | 1362256972 | Python | Python | py | Accepted | 20 | 4224 | 142 | for i in range(input()):
q = map(int,raw_input().split())
q.sort()
a = "YES" if q[0]**2 + q[1]**2 == q[2]**2 else "NO"
print a | 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
| 2,919 |
s862753584 | p00003 | u246394513 | 1362285210 | Python | Python | py | Accepted | 20 | 4232 | 119 | for i in range(int(raw_input())):a=sorted([int(x)**2 for x in raw_input().split()]);print ["NO","YES"][a[0]+a[1]==a[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
| 2,920 |
s317077391 | p00003 | u282635979 | 1363859701 | Python | Python | py | Accepted | 10 | 4224 | 133 | for val in range(input()):
x = map(int,raw_input().split(' '))
x.sort()
if x[0]**2+x[1]**2==x[2]**2: print 'YES'
else: print 'NO' | p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,921 |
s569873130 | p00003 | u585414111 | 1365340136 | Python | Python | py | Accepted | 20 | 4220 | 173 | import sys
n = raw_input()
for line in sys.stdin:
li = sorted([int(x) for x in line.split()],reverse=True)
print "YES" if (li[0]**2 == li[1]**2 + li[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
| 2,922 |
s639238163 | p00003 | u455516672 | 1365668407 | Python | Python | py | Accepted | 20 | 4224 | 121 | for i in range(input()):
a=sorted(map(int,raw_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
| 2,923 |
s927402504 | p00003 | u455516672 | 1365668620 | Python | Python | py | Accepted | 20 | 4224 | 124 | for i in range(input()): a=sorted(map(int,raw_input().split()));a=[i**2 for i in a];print "YES" if a[0]+a[1]==a[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
| 2,924 |
s108943509 | p00003 | u318424563 | 1366626855 | Python | Python | py | Accepted | 20 | 4296 | 641 | data = []
try:
while True:
data.append(raw_input())
except EOFError:
pass
n = int(data[0])
if n <= 1000:
for i in range(1, n+1):
x, y, z = data[i].split()
x, y, z = int(x), int(y), int(z)
if x <= 1000 and y <= 1000 and z <= 1000:
if (z * 0.8 == x and z * 0.6 == y
or z * 0.8 == y and z * 0.6 == x
or y * 0.8 == x and y * 0.6 == z
or y * 0.8 == z and y * 0.6 == x
or x * 0.8 == z and x * 0.6 == y
or x * 0.8 == y and x * 0.6 == 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
| 2,925 |
s226452005 | p00003 | u350508326 | 1367932826 | Python | Python | py | Accepted | 20 | 4248 | 1,084 | import sys
count = int(raw_input())
#print count
while 0 < count:
count -=1
#print count
a = map(int,raw_input().split())
#print a[0],a[1],a[2]
if a[1]< a[2]:
tmp = a[1]
a[1] = a[2]
a[2] = tmp
if a[0] < a[1]:
tmp = a[0]
a[0] = a[1]
a[1] = tmp
n = a[1]*a[1] + a[2]*a[2]
if a[0]*a[0] == 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
| 2,926 |
s312734458 | p00003 | u542421762 | 1368081101 | Python | Python | py | Accepted | 20 | 4248 | 373 |
import sys
import re
def judge(a, b, c):
if a ** 2 + b ** 2 == c ** 2:
return "YES"
else:
return "NO"
#file = sys.argv[1]
#lis = open(file, "r").readlines()
lis = sys.stdin.readlines()
lis.pop(0)
for line in lis:
edges = map((lambda x: int(x)), re.split(" +", line))
edges.sort()
r = judge(edges[0], edges[1], edges[2])
print r | 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
| 2,927 |
s721339735 | p00003 | u093607836 | 1369111487 | Python | Python | py | Accepted | 20 | 4216 | 230 | while True:
try:
list = [int(item) for item in raw_input().split()]
list.sort()
if list[0] ** 2 + list[1] ** 2 == list[2] ** 2 :
print 'YES'
else :
print 'NO'
except EOFError:
break
except IndexError:
continue | 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
| 2,928 |
s554561556 | p00003 | u536245846 | 1374655788 | Python | Python | py | Accepted | 20 | 4224 | 137 | for i in range(int(raw_input())):
n = sorted(map(int, raw_input().split()))
print "YES" if n[2]**2 == n[1]**2 + n[0]**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
| 2,929 |
s587042094 | p00003 | u843960735 | 1374700500 | Python | Python | py | Accepted | 20 | 4236 | 231 | n = int(raw_input())
for x in range(n) :
edges = map(int, raw_input().split())
a = min(edges); edges.remove(a)
b = min(edges); edges.remove(b)
c = edges[0]
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
| 2,930 |
s951807420 | p00003 | u085789778 | 1374757766 | Python | Python | py | Accepted | 20 | 4236 | 281 | # -*- coding:utf-8 -*-
if __name__ == '__main__':
N = int(raw_input())
for i in range(0,N):
a, b, c = raw_input().split()
triangle = [int(a),int(b),int(c)]
triangle.sort()
if(triangle[2]**2 == triangle[0]**2 + triangle[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
| 2,931 |
s342800898 | p00003 | u912573907 | 1375166461 | Python | Python | py | Accepted | 20 | 4232 | 173 | n = input()
for i in range(n):
l = map(int, raw_input().split())
l.sort()
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
| 2,932 |
s550163940 | p00003 | u147801965 | 1375549125 | Python | Python | py | Accepted | 20 | 4216 | 116 | for i in range(input()):
q,w,e=sorted(map(int,raw_input().split()))
print "YES" if q**2+w**2==e**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
| 2,933 |
s905736938 | p00003 | u455025374 | 1376079965 | Python | Python | py | Accepted | 20 | 4220 | 113 | for i in range(input()):
a,b,c=sorted(map(int,raw_input().split()))
print "YES" if a*a+b*b==c*c 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
| 2,934 |
s618311219 | p00003 | u228756885 | 1376482793 | Python | Python | py | Accepted | 10 | 4224 | 165 | #coding UTF-8
for i in range(input()):
num = map(int, raw_input().split(" "))
num.sort()
if num[0]**2+num[1]**2 == num[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
| 2,935 |
s531372199 | p00003 | u912237403 | 1376718745 | Python | Python | py | Accepted | 20 | 4228 | 170 | import sys
n=input()
for i in range(n):
a, b, c = sorted(map(int, raw_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
| 2,936 |
s039936150 | p00003 | u912237403 | 1376718900 | Python | Python | py | Accepted | 20 | 4224 | 154 | n=input()
for i in range(n):
a, b, c = sorted(map(int, raw_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
| 2,937 |
s300645768 | p00003 | u813384600 | 1379306408 | Python | Python | py | Accepted | 20 | 4320 | 169 | n = int(raw_input())
for (a,b,c) in [sorted(map(int, raw_input().split())) for i in range(n)]:
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
| 2,938 |
s785879073 | p00003 | u389390219 | 1380934714 | Python | Python | py | Accepted | 20 | 4216 | 112 | for i in range(input()):
a,b,c=sorted(map(int,raw_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
| 2,939 |
s267709986 | p00003 | u492005863 | 1381233914 | Python | Python | py | Accepted | 20 | 4300 | 432 | # Is it a Right Triangle?
import sys
N = 0
datas = []
for (i, line) in enumerate(sys.stdin):
if i == 0:
N = int(line)
else:
datas.append([int(line.split()[0]), int(line.split()[1]), int(line.split()[2])])
for data in datas:
index = data.index(max(data))
x = data[index] * data[index]
y = 0
for i in [0, 1, 2]:
if index == i:
continue
else:
y += data[i] * data[i]
if x == y:
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
| 2,940 |
s309571640 | p00003 | u351182591 | 1381507404 | Python | Python | py | Accepted | 20 | 4236 | 228 | n = input()
for x in range(n):
l = map(int,raw_input().split())
lmax = max(l)
l.remove(lmax)
if l[0]**2 + l[1]**2 == lmax**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
| 2,941 |
s174191452 | p00003 | u511257811 | 1381940129 | Python | Python | py | Accepted | 20 | 4200 | 221 | import sys
for lineCount, line in enumerate(sys.stdin):
if lineCount == 0:
continue
a, b, c = sorted(map(int, line.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
| 2,942 |
s874700024 | p00003 | u674319057 | 1382285556 | Python | Python | py | Accepted | 20 | 4220 | 226 | #!/usr/bin/env python
iiart = lambda x,y,z: "YES" if (z**2 == x**2+y**2) else "NO"
if __name__ == "__main__":
for i in range(int(raw_input())):
print "%s" % (iiart(*sorted([int(x) for x in raw_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
| 2,943 |
s301041003 | p00003 | u093607836 | 1382332693 | Python | Python | py | Accepted | 20 | 4192 | 126 | for i in xrange(input()):
i,j,k = sorted([int(i) for i in raw_input().split()])
print "YES" if i**2 + j**2 == k**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
| 2,944 |
s162144395 | p00003 | u180584272 | 1384079983 | Python | Python | py | Accepted | 20 | 4204 | 172 | timel = int(raw_input())
for gomi in xrange(timel):
a,b,c = map(lambda x: int(x)**2, raw_input().split())
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
| 2,945 |
s985724360 | p00003 | u786185717 | 1388680745 | Python | Python | py | Accepted | 20 | 4228 | 213 | n = input()
a = []
for i in range(n):
t = map(int, raw_input().split())
t.sort()
if t[2] ** 2 == t[0] ** 2 + t[1] ** 2:
a.append("YES")
else:
a.append("NO")
for j in a:
print(j) | 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
| 2,946 |
s485217964 | p00003 | u912237403 | 1388788672 | Python | Python | py | Accepted | 20 | 4192 | 116 | n=input()
while n:
n-=1
a,b,c=sorted(map(int,raw_input().split()))
print "YES" if a*a+b*b==c*c 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
| 2,947 |
s547037934 | p00003 | u912237403 | 1388789205 | Python | Python | py | Accepted | 20 | 4208 | 112 | for i in range(input()):
a,b,c=sorted(map(int,raw_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
| 2,948 |
s194886592 | p00003 | u912237403 | 1388789516 | Python | Python | py | Accepted | 20 | 4208 | 113 | for n in range(input()):
a,b,c=sorted(map(int,raw_input().split()))
print "YES" if a*a+b*b==c*c 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
| 2,949 |
s208420353 | p00003 | u912237403 | 1388789553 | Python | Python | py | Accepted | 20 | 4212 | 109 | for n in range(input()):
a,b,c=sorted(map(int,raw_input().split()))
print "YES" if a*a+b*b==c*c 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
| 2,950 |
s588310858 | p00003 | u912237403 | 1390111461 | Python | Python | py | Accepted | 20 | 4212 | 115 | for n in range(input()):
a,b,c=sorted(map(int,raw_input().split()))
s="YES" if a*a+b*b==c*c else "NO"
print s | 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
| 2,951 |
s978758272 | p00003 | u912237403 | 1390111707 | Python | Python | py | Accepted | 10 | 4212 | 113 | for n in range(input()):
a,b,c=sorted(map(int,raw_input().split()))
print "YES" if a*a + b*b == c*c 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
| 2,952 |
s945283428 | p00003 | u912237403 | 1390118755 | Python | Python | py | Accepted | 10 | 4212 | 108 | for n in range(input()):
a,b,c=sorted(map(int,raw_input().split()))
print "NO" if c*c-a*a-b*b else "YES" | 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
| 2,953 |
s737725576 | p00003 | u230836528 | 1392093651 | Python | Python | py | Accepted | 20 | 4232 | 257 | # -*- coding: utf-8 -*-
import sys
for line in sys.stdin.readlines():
List = map(int, line.strip().split())
if len(List) == 1: continue
List.sort()
if(List[2]**2 == List[0]**2 + List[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
| 2,954 |
s406755494 | p00003 | u633068244 | 1393346665 | Python | Python | py | Accepted | 20 | 4368 | 205 | import math
n = int(raw_input())
for i in range(n):
a = map(int, raw_input().split())
a.sort()
c = math.sqrt(a[0]**2+a[1]**2)
if c == a[2]:
print "YES"
else:
print "NO" | p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,955 |
s100131595 | p00003 | u858885710 | 1393831927 | Python | Python | py | Accepted | 20 | 4212 | 135 | N = int(raw_input())
for i in range(N):
a,b,c = sorted(map(int, raw_input().split()))
print (a**2 + b**2 == c**2 and 'YES') or '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
| 2,956 |
s140421750 | p00003 | u140201022 | 1395785594 | Python | Python | py | Accepted | 20 | 4216 | 142 | n=int(raw_input())
for i in range(n):
l=map(int, raw_input().split())
l.sort()
print 'YES' if (l[2])**2==l[0]**2+l[1]**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
| 2,957 |
s992520913 | p00003 | u491763171 | 1396337071 | Python | Python | py | Accepted | 20 | 4208 | 167 | for i in range(input()):
L = map(int, raw_input().split())
L.sort()
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
| 2,958 |
s161392182 | p00003 | u292964502 | 1396572796 | Python | Python | py | Accepted | 20 | 4212 | 191 | for i in range(input()):
ary = map(int,raw_input().split())
c = max(ary)
ary.remove(c)
a,b = ary
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
| 2,959 |
s520328282 | p00003 | u246033265 | 1396602331 | Python | Python | py | Accepted | 20 | 4212 | 149 | n = int(raw_input())
for i in range(n):
a = sorted(map(int, raw_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
| 2,960 |
s124671959 | p00003 | u912237403 | 1396965079 | Python | Python | py | Accepted | 20 | 4208 | 106 | for n in range(input()):
a,b,c=sorted(map(int,raw_input().split()))
print ["NO","YES"][c*c-a*a-b*b==0] | 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
| 2,961 |
s644521925 | p00003 | u912237403 | 1396965146 | Python | Python | py | Accepted | 20 | 4212 | 104 | for n in range(input()):
a,b,c=sorted(map(int,raw_input().split()))
print ["NO","YES"][c*c==a*a+b*b] | 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
| 2,962 |
s263114055 | p00003 | u912237403 | 1396965253 | Python | Python | py | Accepted | 20 | 4212 | 108 | m=["NO","YES"]
for n in range(input()):
a,b,c=sorted(map(int,raw_input().split()))
print m[c*c==a*a+b*b] | 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
| 2,963 |
s805727321 | p00003 | u708217907 | 1397818521 | Python | Python | py | Accepted | 20 | 4220 | 158 | import sys
n = input()
for i in range(n):
x = map(int, raw_input().split(' '))
x.sort()
if (x[0]**2+x[1]**2)==x[2]**2:print("YES")
else: print("NO") | p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,964 |
s471033628 | p00003 | u791201756 | 1397877090 | Python | Python | py | Accepted | 20 | 4212 | 182 | n = int(raw_input())
for i in range(n):
a = map(int,raw_input().split())
a.sort()
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
| 2,965 |
s987859290 | p00003 | u146816547 | 1398774086 | Python | Python | py | Accepted | 10 | 4196 | 154 | n = int(raw_input())
for i in xrange(n):
a = map(int,raw_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
| 2,966 |
s466188494 | p00003 | u047988051 | 1400120834 | Python | Python3 | py | Accepted | 50 | 6724 | 145 | 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
| 2,967 |
s638758267 | p00003 | u436634575 | 1400910123 | Python | Python3 | py | Accepted | 40 | 6720 | 141 | n = int(input())
for i in range(n):
a, b, c = sorted(map(int, input().strip().split()))
print('YES' if a**2 + b**2 == c**2 else 'NO') | 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
| 2,968 |
s532850938 | p00003 | u462169221 | 1401801115 | Python | Python | py | Accepted | 20 | 4224 | 194 |
def tr(a,b,c):
l = a*a
m = b*b
n = c*c
if(l+m==n or m+n==l or l+n==m):
print "YES"
else:
print "NO"
for i in range(int(raw_input())):
(l,m,n) = map(int,raw_input().split())
tr(l,m,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
| 2,969 |
s783108390 | p00003 | u618672141 | 1403738280 | Python | Python3 | py | Accepted | 50 | 6720 | 291 | def triangle(a, b, c):
return a * a + b * b == c * c
t = int(input())
for i in range(t):
sides = input().split(' ')
for i in range(3):
sides[i] = int(sides[i])
sides.sort()
r = triangle(sides[0], sides[1], sides[2])
if (r): print("YES")
else: print("NO") | 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
| 2,970 |
s831158431 | p00003 | u342624490 | 1597754803 | Python | Python3 | py | Accepted | 40 | 5596 | 134 | 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
| 2,971 |
s806992464 | p00003 | u365131854 | 1597752300 | Python | Python3 | py | Accepted | 40 | 5596 | 117 | 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
| 2,972 |
s285394565 | p00003 | u430159711 | 1597687979 | Python | Python3 | py | Accepted | 40 | 5608 | 313 | x=int(input())
list=[]
for i in range(x):
a,b,c=input().split()
list.append((int(a),int(b),int(c)))
a=int(a)
b=int(b)
c=int(c)
if a*a==b*b+(c*c):
print("YES")
elif b*b==a*a+(c*c):
print("YES")
elif c*c==a*a+(b*b):
print("YES")
else:
print("NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,973 |
s354351428 | p00003 | u326077502 | 1597629075 | Python | Python3 | py | Accepted | 40 | 5592 | 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
| 2,974 |
s157847142 | p00003 | u852547520 | 1597553601 | Python | Python3 | py | Accepted | 40 | 5592 | 212 | N=int(input())
for i in range(1,N+1) :
x,y,z = map(int,input().split())
X=max(x,y,z)
Y=min(x,y,z)
Z=x+y+z-X-Y
if X**2==Y**2+Z**2:
print("YES")
else :
print("NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,975 |
s649871148 | p00003 | u476754031 | 1597476324 | Python | Python3 | py | Accepted | 40 | 5596 | 134 | 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
| 2,976 |
s296619183 | p00003 | u023941195 | 1597385362 | Python | Python3 | py | Accepted | 40 | 5592 | 183 | N = int(input())
for i in range(N):
a = list(map(int, input().split()))
a.sort()
if a[2] ** 2 == a[0] ** 2 + a[1] ** 2:
print("YES")
else:
print("NO")
| 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
| 2,977 |
s114229333 | p00003 | u250040203 | 1597047389 | Python | Python3 | py | Accepted | 30 | 5596 | 226 | 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)))
d = L[0] ** 2 + L[1] ** 2
if m ** 2 ==d:
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
| 2,978 |
s778352208 | p00003 | u885258138 | 1596940302 | Python | Python3 | py | Accepted | 40 | 5596 | 244 | a=int(input())
for i in range(a):
x,y,z=map(int,input().split())
if x>y:
x,y=y,x
if y>z:
y,z=z,y
if x>y:
x,y=y,x
if z**2==x**2+y**2:
print("YES")
else:
print("NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,979 |
s787262956 | p00003 | u878828646 | 1596624299 | Python | Python3 | py | Accepted | 40 | 5604 | 314 | x=int(input())
list=[]
for i in range(x):
a,b,c=input().split()
list.append((int(a),int(b),int(c)))
a=int(a)
b=int(b)
c=int(c)
if a*a==b*b+(c*c):
print('YES')
elif b*b==a*a+(c*c):
print('YES')
elif c*c==a*a+(b*b):
print('YES')
else:
print('NO')
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,980 |
s298125416 | p00003 | u392970366 | 1596609789 | Python | Python3 | py | Accepted | 40 | 5596 | 245 | def triangle(dataset):
a, b, c = dataset
if a*a + b*b == c*c:
return 1
return 0
N = int(input())
for _ in range(N):
dataset = sorted(map(int, input().split()))
flag = triangle(dataset)
print(["NO", "YES"][flag])
| 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
| 2,981 |
s372661903 | p00003 | u940828136 | 1596600916 | Python | Python3 | py | Accepted | 50 | 5596 | 201 | 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
| 2,982 |
s147336172 | p00003 | u309196579 | 1596592401 | Python | Python3 | py | Accepted | 40 | 5600 | 245 | def triangle(dataset):
a, b, c = dataset
if a*a + b*b == c*c:
return 1
return 0
N = int(input())
for _ in range(N):
dataset = sorted(map(int, input().split()))
flag = triangle(dataset)
print(["NO", "YES"][flag])
| 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
| 2,983 |
s032685106 | p00003 | u548283997 | 1596465221 | Python | Python3 | py | Accepted | 50 | 5652 | 298 | 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
| 2,984 |
s282279689 | p00003 | u363460225 | 1596387300 | Python | Python3 | py | Accepted | 40 | 5604 | 729 | N=int(input())
for i in range (N):
A,B,C = map(int,input().split())
if A>B>=C:
if A**2==B**2+C**2:
print("YES")
else:
print("NO")
elif A>C>=B:
if A**2==C**2+B**2:
print("YES")
else:
print("NO")
elif B>A>=C:
if B**2==A**2+C**2:
print("YES")
else:
print("NO")
elif B>C>=A:
if B**2==A**2+C**2:
print("YES")
else:
print("NO")
elif C>A>=B:
if C**2==A**2+B**2:
print("YES")
else:
print("NO")
else:
if C**2==B**2+A**2:
print("YES")
else:
print("NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,985 |
s634229468 | p00003 | u896809383 | 1596371355 | Python | Python3 | py | Accepted | 40 | 5592 | 128 | for _ in range(int(input())):
a, b, c = sorted(list(map(int, input().split())))
print("YES" if a**2 + b**2 == c**2 else "NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,986 |
s863565183 | p00003 | u996694149 | 1596289058 | Python | Python3 | py | Accepted | 50 | 5604 | 224 | N = int(input())
i = 0
while True:
a = list((int(x)for x in input().split()))
a.sort()
i += 1
if a[0]**2 + a[1]**2 == a[2]** 2:
print("YES")
else:
print("NO")
if i == N:
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
| 2,987 |
s467112257 | p00003 | u512192552 | 1596270681 | Python | Python3 | py | Accepted | 40 | 5604 | 214 | # coding: utf-8
# Your code here!
N=int(input())
for i in range(N):
a,b,c=map(int,input().split())
a,b,c=sorted([a,b,c])
if a**2+b**2==c**2:
print('YES')
else:
print('NO')
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,988 |
s596882893 | p00003 | u849721539 | 1596269235 | Python | Python3 | py | Accepted | 40 | 5592 | 173 | N=int(input())
for i in range(N):
L=list(map(int,input().split()))
L.sort()
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
| 2,989 |
s352123848 | p00003 | u920513163 | 1596259098 | Python | Python3 | py | Accepted | 40 | 5596 | 251 | x=int(input())
for _ in range(x):
a,b,c=map(int,input().split())
if a**2 + b**2 == c**2:
print('YES')
elif b**2 + c**2 == a**2:
print('YES')
elif c**2 + a**2 == b**2:
print('YES')
else:
print('NO')
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,990 |
s177685289 | p00003 | u413704014 | 1596111952 | Python | Python3 | py | Accepted | 50 | 5604 | 235 | N = int(input())
i = 0
while True:
a = list((int(x) for x in input().split()))
a.sort()
i += 1
if a[0] ** 2 + a[1] ** 2 == a[2] ** 2:
print("YES")
else:
print("NO")
if i == N:
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
| 2,991 |
s047017519 | p00003 | u770042163 | 1595918514 | Python | Python3 | py | Accepted | 40 | 5600 | 142 | for i in range(int(input())):
a, b, c = sorted([int(i) for i in input().split()])
print('YES' if a ** 2 + b ** 2 == c ** 2 else 'NO')
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,992 |
s702607414 | p00003 | u632910712 | 1595671236 | Python | Python3 | py | Accepted | 40 | 5596 | 190 | N = int(input())
for i in range(N):
x,y,z = map(int,input().split())
a = [x,y,z]
x,y,z = sorted(a)
if x**2 + y**2 == z**2:
print("YES")
else:
print("NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,993 |
s519348012 | p00003 | u965173609 | 1595510422 | Python | Python3 | py | Accepted | 50 | 5596 | 234 | i=int(input())
for j in range(i):
a,b,c=map(int,input().split())
d=[a,b,c]
list=sorted(d)
x=int(list[0])
y=int(list[1])
z=int(list[2])
if x**2+y**2==z**2:
print("YES")
else:
print("NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,994 |
s390394546 | p00003 | u762022668 | 1595240805 | Python | Python3 | py | Accepted | 40 | 5592 | 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
| 2,995 |
s964728282 | p00003 | u940983140 | 1595226666 | Python | Python3 | py | Accepted | 30 | 5596 | 437 | n=int(input())
for i in range(n):
a,b,c=map(int,input().split())
if a>b and a>c:
if a**2==b**2+ c**2:
print("YES")
else:
print("NO")
elif b>a and b>c:
if b**2==a**2+c**2:
print("YES")
else:
print("NO")
elif c>a and c>b:
if c**2==a**2+b**2:
print("YES")
else:
print("NO")
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
| 2,996 |
s488719092 | p00003 | u633358233 | 1595166576 | Python | Python3 | py | Accepted | 40 | 5600 | 196 | n=int(input())
for i in range(n):
a,b,c=map(int,input().split())
d=[a,b,c]
d=sorted(d)
if d[0]**2+d[1]**2 == d[2]**2:
print("YES")
else:
print("NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,997 |
s996938948 | p00003 | u829520323 | 1595166360 | Python | Python3 | py | Accepted | 40 | 5596 | 189 | n=int(input())
for i in range(n):
a,b,c = map(int,input().split())
d=[a,b,c]
d=sorted(d)
if d[0]**2+d[1]**2==d[2]**2:
print("YES")
else:
print("NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,998 |
s900507094 | p00003 | u782152619 | 1594996359 | Python | Python3 | py | Accepted | 40 | 5596 | 165 | N = int(input())
for i in range (N):
a, b, c = sorted(map(int, input().split()))
if a**2 + b**2 == c**2 :
print("YES")
else:
print("NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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
| 2,999 |
s486971871 | p00003 | u319403848 | 1594963037 | Python | Python3 | py | Accepted | 40 | 5596 | 204 | N = int(input())
for i in range(N) :
a, b, c = map(int, input().split())
if a**2 == b**2 + c**2 or b**2 == c**2 + a**2 or c**2 == a**2 + b**2 :
print("YES")
else :
print("NO")
| p00003 |
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ 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,000 |
s740389798 | p00003 | u799076010 | 1594686422 | Python | Python3 | py | Accepted | 40 | 5592 | 185 | 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,001 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.