Option Strict On
Module Module1

    Sub Main()
        Dim l() As String = Split(Console.ReadLine())
        Dim a As Integer = Convert.ToInt32(l(0))
        Dim b As Integer = Convert.ToInt32(l(1))
        Dim c As Integer = Convert.ToInt32(l(2))
        If a < c And c < b Or a > c And c > b Then
            Console.WriteLine("Yes")
        Else
            Console.WriteLine("No")
        End If
        Console.ReadLine()
    End Sub

End Module