#include using namespace std; int main() { int n, a, b, c; cin >> n >> a >> b >> c; if(c < a){ if(b >= a) cout << "No" << endl; else cout << "Yes" << endl; } else if(c > a){ if(b <= a) cout << "No" << endl; else cout << "Yes" << endl; } else cout << "No" << endl; }