//利用函数去遍历所有排列,然后枚举就可以了
#include <bits/stdc++.h>
using namespace std;
#define int long long
bool check(int x, int y, int z) {
return (x + y > z) && (x + z > y) && (y + z > x);
}
void solve() {
vector<int> a(6);
for(int i = 0; i < 6; i++){
cin >> a[i];
}
sort(a.begin(), a.end());
do {
if (check(a[0], a[1], a[2]) && check(a[3], a[4], a[5])) {
cout << "Yes" << "\n";
return;
}
} while (next_permutation(a.begin(), a.end()));
cout << "No" << "\n";
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while(t--) {
solve();
}
return 0;
}