OJ-Problems-Source/HDOJ/2218_autoAC.cpp
2016-08-22 00:09:53 +08:00

18 lines
303 B
C++

#include <iostream>
using namespace std;
int main()
{
int a[6],i,n;
cin>>n;
while(n--)
{
for(i=0;i<6;i++)
cin>>a[i];
if(a[0]-a[1]+a[2]-a[3]+a[4]-a[5]==0)
cout<<"YES\n";
else
cout<<"NO\n";
}
return 0;
}