//asfaq//................ #include using namespace std; int main() { int x,y; int TC,q; cin >> TC; while (TC--){ cin >> q; int p = 1; for (int i =0 ;i < q; i++){ cin >> x >> y; if (x>0 && y > 0){ p=0; } } if (p) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }