#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::max;
using std::swap;
int main() {
  int A, B, a, b, c, d;
  cin >> A >> B >> a >> b >> c >> d;
  for (int i = 0; i < 4; ++i) {
    if (i & 1) swap(c, d);
    if (((a + c) <= A and max(b, d) <= B) || ((b + d) <= B and max(a, c) <= A))
      return cout << "YES", 0;
    swap(a, b);
  }
  cout << "NO";
}
