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



for i in range(n-1):

    l = c*(n-1-i)-d*i

    r = -c*i+(n-1-i)*d

    if l <= b-a <= r:

        print('YES')

        exit()

else:

    print('NO')

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

for m in range(n):

    l = c*(n-1-m)-d*m

    r = d*(n-1-m)-c*m

    if l <= b-a <= r:

        print('YES')

        exit()

else:

    print('NO')

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

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

-for i in range(n - 1): -    l = c * (n - 1 - i) - d * i -    r = -c * i + (n - 1 - i) * d +for m in range(n): +    l = c * (n - 1 - m) - d * m +    r = d * (n - 1 - m) - c * m