#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, row, col;
  cin >> t;
  while (t--) {
    cin >> row >> col;
    if (row <= 2 && col <= 2)
      cout << "Yes" << endl;
    else if (row == 1 || col == 1)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
