P26623 [AtCoder] On the Way
入门
题目描述

Problem Description

There are houses $1, 2, 3$ on a number line, with their respective coordinates being $A, B, C$. If you go straight from house $1$ to house $2$ without making any detours and pass through the coordinate of house $3$ on the way, output Yes; otherwise, output No.

Input Format

The input is given from the standard input in the following format:

$ A $ $ B $ $ C $

Output Format

Output Yes if you pass through the coordinate of house $3$ on the way from house $1$ to house $2$ without making any detours; otherwise, output No.

Sample Input and Output

Sample Input #1

3 8 5

Sample Output #1

Yes

Sample Input #2

7 3 1

Sample Output #2

No

Sample Input #3

10 2 4

Sample Output #3

Yes

Sample Input #4

31 41 59

Sample Output #4

No

Notes/Hints

Constraints

  • $0\leq\ A,B,C\leq\ 100$
  • $ A,B,C $ are distinct integers

Sample Explanation 1

When going straight from the house at coordinate $3$ to the house at coordinate $8$, you pass through coordinate $5$.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3 8 5
样例输出
Yes