6191: ABC228 —— A - On and Off
[Creator : ]
Description
Takahashi turns on the light of his room at $S$ o'clock (on the $24$-hour clock) every day and turns it off at $T$ o'clock every day.
The date may change while the light is on.
Determine whether the light is on at $30$ minutes past $X$ o'clock.
The date may change while the light is on.
Determine whether the light is on at $30$ minutes past $X$ o'clock.
Input
Input is given from Standard Input in the following format:
$S\ T\ X$
$S\ T\ X$
Output
If the light is on at $30$ minutes past $X$ o'clock, print Yes; otherwise, print No.
Constraints
$0≤S,T,X≤23\\
S \neq T$
All values in input are integers.
S \neq T$
All values in input are integers.
Sample 1 Input
7 20 12
Sample 1 Output
Yes
The light is on between $7$ o'clock and $20$ o'clock. At $30$ minutes past $12$ o'clock, it is on, so we print Yes.
Sample 2 Input
20 7 12
Sample 2 Output
No
The light is on between $0$ o'clock and $7$ o'clock, and between $20$ o'clock and $0$ o'clock (on the next day). At $30$ minutes past $12$ o'clock, it is off, so we print No.
Sample 3 Input
23 0 23
Sample 3 Output
Yes