n = int(input())
a, b, c = map(int, input().split())
if a == c:
    print("No")
elif a < c:
    if b < a:
        print("No")
    else:
        print("Yes")
else:
    if a < b:
        print("No")
    else:
        print("Yes")