#include #include #include #include #include #include #include #define inf 999999999 #define mo 1000000007 #define LL long long using namespace std; const LL maxn=1000000; LL t,x,y,z,nx,nz,s1,s2,s3,s4; LL a[maxn],b[maxn],c[maxn]; int main() { cin>>t; int flag; for (int i=1;i<=t;i++) { cin>>x>>y>>z; nx=0; for (int i=1;i*i<=x;i++) if (x%i==0) {nx++;a[nx]=i;} nz=0; for (int i=1;i*i<=z;i++) { if (z%i==0) {nz++;b[nz]=i;} } flag=0; for (int i=1;i<=nx;i++) { s1=a[i];s2=x/a[i]; for (int j=1;j<=nz;j++) { s3=b[j];s4=z/b[j]; if (s1*s3+s2*s4==y) flag=1; if (s1*s4+s2*s3==y) flag=1; if (flag) break; } if (flag) break; } if (flag) cout<<"YES"<