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

f=0

for i in range(n):f|=i*c-(~i+n)*d<=b-a<=i*d-(~i+n)*c

print(('NYOE S'[f::2]))
n,a,b,c,d=list(map(int,input().split()));print(('NYOE S'[any(c*i-d*(~i+n)<=b-a<=d*i-c*(~i+n)for i in range(n))::2]))
n, a, b, c, d = list(map(int, input().split()))
f = 0
for i in range(n):
    f |= i * c - (~i + n) * d <= b - a <= i * d - (~i + n) * c
print(("NYOE S"[f::2]))

n, a, b, c, d = list(map(int, input().split()))
print(
    (
        "NYOE S"[
            any(
                c * i - d * (~i + n) <= b - a <= d * i - c * (~i + n) for i in range(n)
            ) :: 2
        ]
    )
)

-f = 0 -for i in range(n): -    f |= i * c - (~i + n) * d <= b - a <= i * d - (~i + n) * c -print(("NYOE S"[f::2])) +print( +    ( +        "NYOE S"[ +            any( +                c * i - d * (~i + n) <= b - a <= d * i - c * (~i + n) for i in range(n) +            ) :: 2 +        ] +    ) +)