OJ-Problems-Source/Codeforces/Gym/100819T.cpp

28 lines
431 B
C++
Raw Permalink Normal View History

2016-08-15 21:41:06 +08:00
#include <cstdio>
#include <algorithm>
using namespace std;
int a[3];
int b[3];
int main()
{
for(int i=0;i<3;i++)
{
scanf("%d",&a[i]);
}
for(int i=0;i<3;i++)
{
scanf("%d",&b[i]);
}
sort(a,a+3);
sort(b,b+3);
if(a[0]==b[0]&&a[1]==b[1]&&a[2]==b[2] && a[2]*a[2]==a[0]*a[0]+a[1]*a[1] )
{
printf("YES\n");
}
else
{
printf("NO\n");
}
return 0;
}