#include int main() { int a, b, c; std::cin >> a >> a >> b >> c; std::cout << (((a < b && a < c) || (b < a && c < a)) ? "Yes\n" : "No\n"); }