Have you ever tried to explain to the coordinator, why it is eight hours to the contest and not a single problem has been prepared yet? Misha had. And this time he has a really strong excuse: he faced a space-time paradox! Space and time replaced each other.

The entire universe turned into an enormous clock face with three hands — hour, minute, and second. Time froze, and clocks now show the time *h* hours, *m* minutes, *s* seconds.

Last time Misha talked with the coordinator at *t*<sub class="lower-index">1</sub> o'clock, so now he stands on the number *t*<sub class="lower-index">1</sub> on the clock face. The contest should be ready by *t*<sub class="lower-index">2</sub> o'clock. In the terms of paradox it means that Misha has to go to number *t*<sub class="lower-index">2</sub> somehow. Note that he doesn't have to move forward only: in these circumstances time has no direction.

Clock hands are very long, and Misha cannot get round them. He also cannot step over as it leads to the collapse of space-time. That is, if hour clock points 12 and Misha stands at 11 then he cannot move to 1 along the top arc. He has to follow all the way round the clock center (of course, if there are no other hands on his way).

Given the hands' positions, *t*<sub class="lower-index">1</sub>, and *t*<sub class="lower-index">2</sub>, find if Misha can prepare the contest on time (or should we say on space?). That is, find if he can move from *t*<sub class="lower-index">1</sub> to *t*<sub class="lower-index">2</sub> by the clock face.
Five integers *h*, *m*, *s*, *t*<sub class="lower-index">1</sub>, *t*<sub class="lower-index">2</sub> (1 ≤ *h* ≤ 12, 0 ≤ *m*, *s* ≤ 59, 1 ≤ *t*<sub class="lower-index">1</sub>, *t*<sub class="lower-index">2</sub> ≤ 12, *t*<sub class="lower-index">1</sub> ≠ *t*<sub class="lower-index">2</sub>).

Misha's position and the target time do not coincide with the position of any hand.
The three examples are shown on the pictures below from left to right. The starting position of Misha is shown with green, the ending position is shown with pink. Note that the positions of the hands on the pictures are not exact, but are close to the exact and the answer is the same.
12 30 45 3 11
NO
12 0 1 12 1
YES
3 47 0 4 9
YES
10 22 59 6 10
YES
3 1 13 12 3
NO
11 19 28 9 10
YES
9 38 22 6 1
NO
5 41 11 5 8
NO
11 2 53 10 4
YES
9 41 17 10 1
YES
6 54 48 12 6
YES
12 55 9 5 1
NO
8 55 35 9 3
NO
3 21 34 3 10
YES
2 52 1 12 3
NO
7 17 11 1 7
NO
11 6 37 6 4
YES
9 6 22 8 1
NO
3 10 5 5 9
YES
7 12 22 11 2
YES
7 19 4 7 3
NO
11 36 21 4 6
NO
10 32 49 1 3
YES
1 9 43 11 3
NO
1 8 33 4 8
NO
3 0 33 9 4
NO
7 15 9 10 3
NO
8 3 57 11 1
NO
1 33 49 5 9
NO
3 40 0 5 7
YES
5 50 9 2 7
NO
10 0 52 6 1
YES
3 10 4 1 11
NO
2 41 53 4 6
YES
10 29 30 4 7
NO
5 13 54 9 11
NO
1 0 23 3 9
NO
1 0 41 12 1
NO
6 30 30 3 9
YES
3 7 32 11 10
YES
1 0 25 12 4
NO
12 0 0 5 6
YES
1 5 4 3 2
YES
6 30 30 9 10
YES
6 0 0 2 8
NO
10 50 59 9 10
YES
12 59 59 12 6
NO
3 0 30 3 4
NO
2 10 10 1 11
YES
10 5 30 1 12
YES
5 29 31 5 10
YES
5 2 2 11 2
NO
5 15 46 3 10
YES
1 30 50 1 2
NO
5 26 14 1 12
YES
1 58 43 12 1
YES
12 0 12 11 1
NO
6 52 41 6 5
YES
5 8 2 1 3
NO
2 0 0 1 3
NO
1 5 6 2 1
YES
9 5 5 11 12
YES
12 5 19 3 4
NO
6 14 59 1 3
NO
10 38 34 4 12
YES
2 54 14 2 12
YES
5 31 0 6 7
NO
6 15 30 3 9
YES
3 54 41 8 10
NO
3 39 10 10 12
YES
1 11 50 1 2
NO
5 40 24 8 1
NO
9 5 59 1 3
NO
5 0 0 6 7
YES
4 40 59 6 8
YES
10 13 55 12 1
YES
6 50 0 5 6
YES
7 59 3 7 4
YES
6 0 1 6 7
NO
6 15 55 3 5
NO
12 9 55 10 2
YES
2 0 1 11 2
NO
8 45 17 12 9
NO
5 30 31 11 3
YES
6 43 0 10 6
NO
6 30 30 1 11
YES
11 59 59 11 12
YES
5 45 35 9 5
NO
2 43 4 9 7
NO
12 30 50 6 9
NO
1 10 1 2 3
NO
10 5 55 9 1
NO
1 59 59 2 3
YES
1 49 14 10 3
NO
3 15 15 2 4
YES
10 5 55 1 5
NO
6 33 45 12 6
YES
1 20 20 11 1
YES
2 30 45 1 11
YES
1 55 1 11 10
YES
3 0 1 11 1
NO
1 5 6 1 12
YES
12 10 5 11 4
YES
6 5 59 12 1
YES
12 0 20 11 12
YES
3 25 30 4 5
YES
2 15 18 11 1
YES
12 5 48 11 9
NO
6 30 30 10 2
YES
1 0 11 1 2
NO
10 0 1 10 11
NO
3 30 45 10 1
YES
11 21 56 3 12
YES
3 16 16 3 4
YES
11 55 55 1 12
YES
12 12 12 11 12
YES
3 5 1 1 2
NO
3 30 45 10 11
YES
10 0 1 9 10
YES
3 0 5 3 6
NO
1 1 49 1 10
NO
9 45 15 11 12
YES
12 15 59 3 8
NO
5 0 5 3 6
NO
3 30 45 1 2
YES
2 10 11 2 4
YES
2 10 10 4 3
YES
3 30 59 1 2
YES
11 59 59 12 11
YES
10 25 50 5 6
NO
6 30 30 9 3
YES
8 14 40 12 3
NO
2 10 10 1 6
YES
h,m,s,t1,t2=(int(x) for x in input().split())
h=h*5;
t1=t1*5;
t2=t2*5;
cur=t1;
done=False;
while(True):
    if(cur==t2):
        print("YES");
        done=True;
        break;
    cur+=1;
    if(cur==61):
        cur=1;
    if(cur==h or cur ==m or cur ==s):
        break;
if(not done):
    cur=t1;
    while(True):
        if(cur==t2):
            print("YES");
            done=True;
            break;
        cur-=1;
        if(cur==0):
            cur=60;
        if(cur==h or cur ==m or cur ==s):
            break;
    if(not done):
        print("NO")

