On and Off

AtCoder
IDabc228_a
Time2000ms
Memory256MB
Difficulty
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. ## Constraints * $0 \leq S, T, X \leq 23$ * $S \neq T$ * All values in input are integers. ## Input Input is given from Standard Input in the following format: $S$ $T$ $X$ [samples]
Samples
Input #1
7 20 12
Output #1
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`.
Input #2
20 7 12
Output #2
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`.
Input #3
23 0 23
Output #3
Yes
API Response (JSON)
{
  "problem": {
    "name": "On and Off",
    "description": {
      "content": "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 th",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc228_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "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.  \nThe date may change while the light is on.\nDetermine whether th...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments