#include using namespace std; int T; main() { cin>>T; for(;T--;) { long N,A,B; cin>>N>>A>>B; if(N==2||A==1&&B>1||A>1&&B==1)cout<<"YES"<