import sys

input = sys.stdin.readline

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

for i in range(N - 1):

  r = D * (N - i - 1) + A

  l = C * (N - i - 1) + A



  r -= C * i

  l -= D * i

  #print(l, r, i)

  if B in range(l, r + 1):

    print("YES")

    exit(0)

print("NO")
import sys

input = sys.stdin.readline

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

for i in range(N - 1):

  l = C * i + A - D * (N - i - 1)

  r = D * i + A - C * (N - i - 1) + 1

  if B in range(l, r):

    print("YES")

    break

else: print("NO")
import sys

input = sys.stdin.readline
N, A, B, C, D = list(map(int, input().split()))
for i in range(N - 1):
    r = D * (N - i - 1) + A
    l = C * (N - i - 1) + A
    r -= C * i
    l -= D * i
    # print(l, r, i)
    if B in range(l, r + 1):
        print("YES")
        exit(0)
print("NO")

import sys

input = sys.stdin.readline
N, A, B, C, D = list(map(int, input().split()))
for i in range(N - 1):
    l = C * i + A - D * (N - i - 1)
    r = D * i + A - C * (N - i - 1) + 1
    if B in range(l, r):
        print("YES")
        break
else:
    print("NO")

-    r = D * (N - i - 1) + A -    l = C * (N - i - 1) + A -    r -= C * i -    l -= D * i -    # print(l, r, i) -    if B in range(l, r + 1): +    l = C * i + A - D * (N - i - 1) +    r = D * i + A - C * (N - i - 1) + 1 +    if B in range(l, r): -        exit(0) -print("NO") +        break +else: +    print("NO")