codeforces 1260 B. Obtain Two Zeroes
分析:
#include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
#include<algorithm>
#include<iostream>
#define ll long long
using namespace std;
ll a,b;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
ll aa,bb;
cin>>aa>>bb;
a=max(aa,bb);
b=min(aa,bb);
int ok;
if(a<=2*b)
{
if((a+b)%3==0)
ok=1;
else
ok=0;
}
else
ok=0;
if(ok==0)
cout<<"NO\n";
else
cout<<"YES\n";
}
return 0;
}