import std.stdio, std.string, std.conv;
import std.typecons;
import std.algorithm, std.array, std.range, std.container;
import std.math;

void main() {
    auto abc  = readln.split.to!(int[]);
    if (abc[0] > abc[1]) {
        auto tmp = abc[0];
        abc[0] = abc[1];
        abc[1] = tmp;
    }
    writeln(abc[0] <= abc[2] && abc[2] <= abc[1] ? "Yes" : "No");
}
