#include <bits/stdc++.h>
#define pb push_back
#define ll int 
#define mp make_pair
#define si short int
#define speed ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define pill pair<ll,ll>
#define f first
#define s second
#define pilc pair<ll,char>
#define all(a) (a).begin(),(a).end()
#define rep(s,e,step) for(int i = (s); i < (e) ; i += step)
#define vrep(s,e,step) for(int j = (s); j < (e) ; j += step)
#define ex exit(0) 
#define sz(a) (a).size()
#define triple pair<pill, ll>
#define pinode pair<node*, node*>
#define quadra pair<pill, pill>
#define ld long double
using namespace std;
 
const ll N = 2e5 + 100;
const ll M = 1e3 + 10;
const ll big = 1e9;
const ll hsh2 = 1964325029 ;
const long long mod = 1e9 + 7;
const long double EPS = 1e-14;
const ll block = 1e7;
const ll shift = 2e3;
mt19937_64 rofl(chrono::steady_clock::now().time_since_epoch().count());
ll t;
void solve() {
	ll a, b, c;
 	cin >> a >> b >> c;
 	ll x = c - ((a ^ ((a - 1) & a)) * (b ^ ((b - 1) & b)));
	cout << (x <= 0? "YES\n" : "NO\n");
}

int main() {
	speed;                                
	cin >> t;
	while(t--) 
		solve();
}
/*
10 3
0101110001


*/