-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathB.cpp
50 lines (50 loc) · 1.83 KB
/
B.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// Created by ahmed_drawy on 26/08/19.
/// c1 sheet
#include <bits/stdc++.h>
#pragma clang diagnostic push
#pragma ide diagnostic ignored "OCUnusedMacroInspection"
using namespace std;
#define lp(i,start , end) for(int i = start ; i<end ; ++i)
#define lllp(i,start , end) for(ll i = start ; i<end ; ++i)
#define inN(arr , n) for(int i = 0 ; i< n ; ++i) cin>>arr[i];
#define Rlp(i,start , end) for(int i = start ; i>end ; --i)
#define all(v) ((v).begin(),(v).end())
#define sz(v) (int)((v).size())
#define clr(v,d) memset(v , d , sizeof(v))
#define inf 0x3f3f3f3f
typedef long long ll;
typedef vector<int> vi;
typedef vector <ll> vll;
typedef vector<vector<int> > adj;
typedef pair<int ,int> pii;
const double EPS =1e-7;
const int OO = 1e6;
bool sortpair( const pair<int , int> & x, const pair<int , int> & y){
return x.first != y.first ? x.first < y.first : x.second > y.second ;
}
int dcomp(double x , double y){
return fabs(x-y) <= EPS? 0: x>y?1:-1;
}
void smile() {
ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("/home/tw3/Desktop/Desktop/training/in.txt", "r", stdin);
// freopen("/home/tw3/Desktop/Desktop/training/out.txt" , "w" , stdout);
#endif // ONLINE_JUDGE
}
int a , b; /// we have 2c1 + 2c1 +2c1 permutation , we need to check them
bool check(int x, int y , int l , int w ){
return (x + y <= a && max(l , w) <=b) ||
(x+y<=b && max(l,w) <=a);
}
int main() {
smile();
int a1 ,a2 , b1, b2 ; cin >> a>>b>>a1>>b1>>a2>>b2;
bool c = check(a1,b2 ,b1,a2)||
check(a1,a2 ,b1,b2)||
check(b1,a2 ,a1,b2)||
check(b1,b2 ,a1,a2);
if(c)cout<<"Yes";
else cout << "NO";
}