n,a,b,c,d=list(map(int,input().split()))

for i in range(n-1):

  if i*c-(n-1-i)*d<=b-a<=i*d-(n-1-i)*c:print("YES");exit()

print("NO")
n,a,b,c,d=list(map(int,input().split()))

x=y=a

for i in range(1,n):

  if (x+y)//2<b:

    x+=c

    y+=d

  else:

    x-=d

    y-=c

if x<=b<=y:print('YES')

else:print('NO')
n, a, b, c, d = list(map(int, input().split()))
for i in range(n - 1):
    if i * c - (n - 1 - i) * d <= b - a <= i * d - (n - 1 - i) * c:
        print("YES")
        exit()
print("NO")

n, a, b, c, d = list(map(int, input().split()))
x = y = a
for i in range(1, n):
    if (x + y) // 2 < b:
        x += c
        y += d
    else:
        x -= d
        y -= c
if x <= b <= y:
    print("YES")
else:
    print("NO")

-for i in range(n - 1): -    if i * c - (n - 1 - i) * d <= b - a <= i * d - (n - 1 - i) * c: -        print("YES") -        exit() -print("NO") +x = y = a +for i in range(1, n): +    if (x + y) // 2 < b: +        x += c +        y += d +    else: +        x -= d +        y -= c +if x <= b <= y: +    print("YES") +else: +    print("NO")