N, A, B, C, D = list(map(int, input().split()))



#右端がでかくしても一般性を失わない

if A > B:

    A, B = B, A



for k in range(N):

    if k * C - (N - 1 - k) * D <= B - A <= k * D - (N - 1 - k) * C:

        print ('YES')

        exit()

print ('NO')
N, A, B, C, D = list(map(int, input().split()))



#右端がでかくしても一般性を失わない

# if A > B:

#     A, B = B, A



k = (B - A + (N - 1) * D) // (C + D)

# print (k)

if k >= (B - A + (N - 1) * C) / (C + D) and N - 1 >= k >= 0:

    print ('YES')

else:

    print ('NO')

N, A, B, C, D = list(map(int, input().split()))
# 右端がでかくしても一般性を失わない
if A > B:
    A, B = B, A
for k in range(N):
    if k * C - (N - 1 - k) * D <= B - A <= k * D - (N - 1 - k) * C:
        print("YES")
        exit()
print("NO")

N, A, B, C, D = list(map(int, input().split()))
# 右端がでかくしても一般性を失わない
# if A > B:
#     A, B = B, A
k = (B - A + (N - 1) * D) // (C + D)
# print (k)
if k >= (B - A + (N - 1) * C) / (C + D) and N - 1 >= k >= 0:
    print("YES")
else:
    print("NO")

-if A > B: -    A, B = B, A -for k in range(N): -    if k * C - (N - 1 - k) * D <= B - A <= k * D - (N - 1 - k) * C: -        print("YES") -        exit() -print("NO") +# if A > B: +#     A, B = B, A +k = (B - A + (N - 1) * D) // (C + D) +# print (k) +if k >= (B - A + (N - 1) * C) / (C + D) and N - 1 >= k >= 0: +    print("YES") +else: +    print("NO")