#include <iostream>
using namespace std;
int main() {
int a, b, c, y, x;
std::cin >> a >> b >> c >> y >> x;
if ((a<=y && b<=x) || (a<=x && b<=y) || (a<=y && c<=x) || (a<=x && c<=y) || (b<=y && c<=x) || (b<=x && c<=y)) cout << "YES";
else {
cout << "NO";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgYSwgYiwgYywgeSwgeDsKCXN0ZDo6Y2luID4+IGEgPj4gYiA+PiBjID4+IHkgPj4geDsKCWlmICgoYTw9eSAmJiBiPD14KSB8fCAoYTw9eCAmJiBiPD15KSB8fCAoYTw9eSAmJiBjPD14KSB8fCAoYTw9eCAmJiBjPD15KSB8fCAoYjw9eSAmJiBjPD14KSB8fCAoYjw9eCAmJiBjPD15KSkgY291dCA8PCAiWUVTIjsKCWVsc2UgewoJCWNvdXQgPDwgIk5PIjsKCX0KCXJldHVybiAwOwp9