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

lb, ub = A, A

for _ in range(1, N):

    if (lb + ub) / 2 < B:

        lb, ub = lb + C, ub + D

    else:

        lb, ub = lb - D, ub - C

if lb <= B <= ub:

    print('YES')

else:

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

for m in range(N):

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

        print('YES')

        break

else:

    print('NO')
N, A, B, C, D = list(map(int, input().split()))
lb, ub = A, A
for _ in range(1, N):
    if (lb + ub) / 2 < B:
        lb, ub = lb + C, ub + D
    else:
        lb, ub = lb - D, ub - C
if lb <= B <= ub:
    print("YES")
else:
    print("NO")

N, A, B, C, D = list(map(int, input().split()))
for m in range(N):
    if C * (N - 1 - m) - D * m <= B - A <= D * (N - 1 - m) - C * m:
        print("YES")
        break
else:
    print("NO")

-lb, ub = A, A -for _ in range(1, N): -    if (lb + ub) / 2 < B: -        lb, ub = lb + C, ub + D -    else: -        lb, ub = lb - D, ub - C -if lb <= B <= ub: -    print("YES") +for m in range(N): +    if C * (N - 1 - m) - D * m <= B - A <= D * (N - 1 - m) - C * m: +        print("YES") +        break