#CCBCMCHIN0000012. Thuộc đoạn đóng (Inside a Closed Interval)
Thuộc đoạn đóng (Inside a Closed Interval)
Inside a Closed Interval
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given integers with , determine whether belongs to the closed interval . Both endpoints are included.
Input
One line with three integers in that order.
Output
Print YES if ; otherwise print NO.
Subtasks
- Subtask 1 (20 points): , ; .
- Subtask 2 (30 points): , ; .
- Subtask 3 (50 points): , ; .
Examples
Example 1
Input
2 6 2
Output
YES
Explanation
The input gives 2, 6, 2. 2 <= 2 is True, and 2 <= 6 is True. Therefore the required output is ['YES'].
Example 2
Input
2 6 7
Output
NO
Explanation
The input gives 2, 6, 7. 2 <= 7 is True, and 7 <= 6 is False. Therefore the required output is ['NO'].