#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int k1 = c + e;
  int k2 = c + f;
  int k3 = d + e;
  int k4 = d + f;
  int k5 = max(c, e);
  int k6 = max(c, f);
  int k7 = max(d, e);
  int k8 = max(d, f);
  if ((k1 <= a && k8 <= b) || (k5 <= a && k4 <= b))
    cout << "YES" << endl;
  else if ((k2 <= a && k7 <= b) || (k6 <= a && k3 <= b))
    cout << "YES" << endl;
  else if ((k3 <= a && k6 <= b) || (k7 <= a && k2 <= b))
    cout << "YES" << endl;
  else if ((k4 <= a && k5 <= b) || (k8 <= a && k1 <= b))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
