Advertisement
JouJoy

R

Dec 12th, 2021
628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. #define ll long long
  4. void solve() {
  5.     ll n;
  6.     cin >> n;
  7.     ll a1, a2, b1, b2, t1, t2;
  8.     cin >> a1 >> a2 >> b1 >> b2 >> t1 >> t2;
  9.     int flag = 0;
  10.  
  11.     if ((b1 < a1 && t1 < a1) || (b1 > a1 && t1 > a1)) {
  12.  
  13.         if ((b2 < a2 && t2 < a2) || (b2 > a2 && t2 > a2))
  14.             flag = 1;
  15.     }
  16.  
  17.     if (flag)
  18.         cout << "YES" << endl;
  19.     else
  20.         cout << "NO" << endl;
  21. }
  22.  
  23. int main() {
  24.     solve();
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement