Circle Metro

题意翻译

罗弗兰波利斯的地铁线有n站。 地铁有两条平行路线。第一个按顺序访问站点1 → 2 → ... → n → 1 → 2 → ...(所以如果x<n下一站后x将等于 (x + 1 ) 否则x将等于1)。第二条路线按顺序访问车站 n → (n - 1 )→ ... → 1 → n → (n - 1 )→ ...(所以如果x>1下一站后x将等于 (x - 1 ) 否则x将等于n)。所有列车都同时离开他们的车站,而且需要完全准确地到达下一站。 两只蟾蜍住在这个城市,他们的名字是丹尼尔和弗拉德。 丹尼尔目前正在火车站的第一条路线a上,当他的火车到达车站时将离开地铁 X x。 巧合的是,弗拉德目前正在火车站的第二条路线b上,当他的火车到达车站时他将离开地铁 y。 令人惊讶的是,所有数字a ,x ,b ,y是不同的。 Toad Ilya要求你检查Daniel和Vlad是否会在旅途中同时站在同一个车站。换句话说,检查他们的列车是否停在同一车站的时刻。请注意,这包括丹尼尔或弗拉德进入或离开地铁的时刻。

题目描述

The circle line of the Roflanpolis subway has $ n $ stations. There are two parallel routes in the subway. The first one visits stations in order $ 1 \to 2 \to \ldots \to n \to 1 \to 2 \to \ldots $ (so the next stop after station $ x $ is equal to $ (x+1) $ if $ x < n $ and $ 1 $ otherwise). The second route visits stations in order $ n \to (n-1) \to \ldots \to 1 \to n \to (n-1) \to \ldots $ (so the next stop after station $ x $ is equal to $ (x-1) $ if $ x>1 $ and $ n $ otherwise). All trains depart their stations simultaneously, and it takes exactly $ 1 $ minute to arrive at the next station. Two toads live in this city, their names are Daniel and Vlad. Daniel is currently in a train of the first route at station $ a $ and will exit the subway when his train reaches station $ x $ . Coincidentally, Vlad is currently in a train of the second route at station $ b $ and he will exit the subway when his train reaches station $ y $ . Surprisingly, all numbers $ a,x,b,y $ are distinct. Toad Ilya asks you to check if Daniel and Vlad will ever be at the same station at the same time during their journey. In other words, check if there is a moment when their trains stop at the same station. Note that this includes the moments when Daniel or Vlad enter or leave the subway.

输入输出格式

输入格式


The first line contains five space-separated integers $ n $ , $ a $ , $ x $ , $ b $ , $ y $ ( $ 4 \leq n \leq 100 $ , $ 1 \leq a, x, b, y \leq n $ , all numbers among $ a $ , $ x $ , $ b $ , $ y $ are distinct) — the number of stations in Roflanpolis, Daniel's start station, Daniel's finish station, Vlad's start station and Vlad's finish station, respectively.

输出格式


Output "YES" if there is a time moment when Vlad and Daniel are at the same station, and "NO" otherwise. You can print each letter in any case (upper or lower).

输入输出样例

输入样例 #1

5 1 4 3 2

输出样例 #1

YES

输入样例 #2

10 2 1 9 10

输出样例 #2

NO

说明

In the first example, Daniel and Vlad start at the stations $ (1, 3) $ . One minute later they are at stations $ (2, 2) $ . They are at the same station at this moment. Note that Vlad leaves the subway right after that. Consider the second example, let's look at the stations Vlad and Daniel are at. They are: - initially $ (2, 9) $ , - after $ 1 $ minute $ (3, 8) $ , - after $ 2 $ minutes $ (4, 7) $ , - after $ 3 $ minutes $ (5, 6) $ , - after $ 4 $ minutes $ (6, 5) $ , - after $ 5 $ minutes $ (7, 4) $ , - after $ 6 $ minutes $ (8, 3) $ , - after $ 7 $ minutes $ (9, 2) $ , - after $ 8 $ minutes $ (10, 1) $ , - after $ 9 $ minutes $ (1, 10) $ . After that, they both leave the subway because they are at their finish stations, so there is no moment when they both are at the same station.