Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int t;
- cin >> t;
- while(t--)
- {
- int a, b, c, d;
- cin >> a >> b >> c >> d;
- int x, y, x1, y1, x2, y2;
- cin >> x >> y >> x1 >> y1 >> x2 >> y2;
- a -= min(x2 - x, b);
- c -= min(y2 - y, d);
- if (x2 - a < x1 || y2 - c < y1)
- cout << "NO\n";
- else
- cout << "YES\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement