#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ int N, a, b, c; cin >> N >> a >> b >> c; if (a < b) cout << (a < c ? "Yes" : "No") << endl; else cout << (c < a ? "Yes" : "No") << endl; return 0; }