#include #include using namespace std; typedef long long LL; bool DFS(LL x, LL y) { if (x == 0 || y == 0) return true; if (x % 2 == 0 && y % 2 == 0) { if (DFS(x / 2, y - 1)) return true; return DFS(x - 1, y / 2); } else if (x % 2 == 0) return DFS(x / 2, y - 1); else if (y % 2 == 0) return DFS(x - 1, y / 2); return false; } void Solve() { LL x, y; scanf("%lld%lld", &x, &y); puts(DFS(x, y) ? "Yes" : "No"); } int main() { // freopen("ops.in", "r", stdin); // freopen("ops.out", "w", stdout); int t; scanf("%d", &t); while (t--) Solve(); return 0; }