#include <bits/stdc++.h>
#define endl "\n"
#define INT long long int

using namespace std;

char infile[100], outfile[100];

int main() {
    ios::sync_with_stdio(false);
    INT T,a, b, n, t, i, I,c;
    cin >> T;
    for(I=1;I<=T;I++){
        sprintf(infile, ".%d.in", I);
        freopen(infile, "w", stdout);
        scanf("%lld %lld",&a, &b);
        printf("%lld %lld\n", a, b);
        sprintf(outfile, ".%d.out", I);
        freopen(outfile, "w", stdout);
        if((2*a*b<=(a+b)*2)){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
}
