You are given a row of N squares, with the leftmost containing integer A and the rightmost containing integer B. The other squares are empty. You need to fill the empty squares with integers such that the absolute difference between any two adjacent squares is between C and D (inclusive). Determine if it's possible to fill the squares under this condition. The constraints are: 3 ≤ N ≤ 500000, 0 ≤ A, B, C, D ≤ 10^9. Input is given as N A B C D, and the output should be "YES" if it's possible, and "NO" otherwise.

# Buggy version:
N,a,b,c,d=map(int, input().split())
N-=1
a,b=0,abs(b-a)
#上下をn回とすると、0<=n<=N//2
if d*N<b:
  print('No')
  exit()
  
for i in range(N//2+1):
  e=b-(N-i*2)*d
  f=b-(N-i*2)*c
  if e<=(d-c)*i and (c-d)*i<=f:
    print('Yes')
    exit()
print('No')

# Fixed version:
N,a,b,c,d=map(int, input().split())
N-=1
a,b=0,abs(b-a)
#上下をn回とすると、0<=n<=N//2
if d*N<b:
  print('NO')
  exit()
  
for i in range(N//2+1):
  e=b-(N-i*2)*d
  f=b-(N-i*2)*c
  if e<=(d-c)*i and (c-d)*i<=f:
    print('YES')
    exit()
print('NO')

# Buggy version:
#agc17-b
n,a,b,c,d=map(int,input().split())
ans='NO'
maxi=a+d*(n-1)
mini=a+c*(n-1)
if mini<b<maxi:
    print('YES')
    exit()
for i in range(1,n):
    maxi=maxi-d-c
    mini=mini-c-d
    if mini<b<maxi:
        ans='YES'
        break

print(ans)

# Fixed version:
#agc17-b
n,a,b,c,d=map(int,input().split())
ans='NO'
maxi=a+d*(n-1)
mini=a+c*(n-1)
if mini<=b<=maxi:
    ans='YES'

else:
    for i in range(1,n):
        maxi=maxi-d-c
        mini=mini-c-d
        if mini<=b<=maxi:
            ans='YES'
            break

print(ans)

# Buggy version:
import sys
input = sys.stdin.buffer.readline


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

#import numpy as np

def main():
	n,a,b,c,d=MI()

	n-=1
	x=abs(b-a)

	ans="NO"

	for i in range(n):
		r=(n-i)*d-c*i
		l=(n-i)*c-d*i
		#print(l,x,r)
		if l<=x<=r:
			ans="Yes"
			#print(l,x,r)
			break
		elif l<0:
			break

	print(ans)





if __name__ == "__main__":
	main()


# Fixed version:
import sys
input = sys.stdin.buffer.readline


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

#import numpy as np

def main():
	n,a,b,c,d=MI()

	n-=1
	x=abs(b-a)

	ans="NO"

	for i in range(n):
		r=(n-i)*d-c*i
		l=(n-i)*c-d*i
		#print(l,x,r)
		if l<=x<=r:
			ans="YES"
			#print(l,x,r)
			break
		elif l<0:
			break

	print(ans)





if __name__ == "__main__":
	main()

# Buggy version:
n,a,b,c,d = map(int, input().split())
for i in range(n):
  pi = i
  mi = n - i
  if a + c * pi - d * mi <= b <= a + d * pi - c * mi:
    print("YES")
    break
else:
  print("NO")

# Fixed version:
n,a,b,c,d = map(int, input().split())
for i in range(n):
  pi = i
  mi = n - i - 1
  if a + c * pi - d * mi <= b <= a + d * pi - c * mi:
    print("YES")
    break
else:
  print("NO")

# Buggy version:
N, A, B, C, D = map(int, input().split())
B -= A

ans = "NO"
for i in range(N):
    high = i * D - (N - i - 1) * C
    low = i * C - (N - i - 1) * D
    print(i, N-i-1, low, high)
    if low <= B <= high:
        ans = "YES"
print(ans)

# Fixed version:
N, A, B, C, D = map(int, input().split())
B -= A

ans = "NO"
for i in range(N):
    high = i * D - (N - i - 1) * C
    low = i * C - (N - i - 1) * D
    if low <= B <= high:
        ans = "YES"
print(ans)

# Buggy version:
N,A,B,C,D=map(int,input().split())
if A> B:
  A,B=B,A
if C>D:
  C,B=B,C

flag=False
diff=B-A
d=0
for i in range(0,N,2):
  d+=D-C
  j= N-1 - i
  if j==0:
    if diff==d:
      flag=True
    break
  k=abs(diff - d) / j
  if k>=C and k<=D:
    flag=True
    break
    
if flag:
  print("YES")
else:
  print("NO")


# Fixed version:
N, A, B, C, D = map(int, input().split())
if A > B:
    A, B = B, A

flag = False
diff = B-A
d = 0
for i in range(0, N, 2):
    if i > 0:
        d += D-C
    j = N-1 - i
    if diff == d and j % 2 == 0:
        flag == True
        break
    if j == 0:
        break

    k = abs(diff - d) / j
    if (k >= C and k <= D) or (abs(diff-d) >= C and abs(diff-d) <= D and j % 2 == 1):
        flag = True
        break
    k = abs(diff + d) / j
    if (k >= C and k <= D) or (diff+d >= C and diff+d <= D and j % 2 == 1):
        flag = True
        break

if flag:
    print("YES")
else:
    print("NO")

# Buggy version:
n,a,b,c,d = map(int,input().split())
lo,hi = -d*n, -c*n
for _ in range(n+1):
  if lo <= a-b <= hi:
    print("YES")
    break
  lo += c+d
  hi += c+d
else:
  print("NO")

# Fixed version:
n,a,b,c,d = map(int,input().split())
lo,hi = -d*(n-1), -c*(n-1)
for _ in range(n):
  if lo <= a-b <= hi:
    print("YES")
    break
  lo += c+d
  hi += c+d
else:
  print("NO")

# Buggy version:
n,a,b,c,d=map(int,input().split());print('NYOE S'[any(i*c-(~i+n)*d<=b-a<=i*d-(~i+n)*cfor i in range(n))::2])

# Fixed version:
n,a,b,c,d=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])

# Buggy version:
n,a,b,c,d=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])

# Fixed version:
n,a,b,c,d=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])

# Buggy version:
n,a,b,c,d=map(int,input().split())
a,b=min(a,b),max(a,b)
pl1=b-d
pr1=b-c
pl2=b+c
pr2=b+d
flag=False
for i in range((n-2)//2+1):
  j=(n-2)-i*2
  al=j*c+i*(c-d)
  ar=j*d+i*(d-c)
  if (al<pl1 and pl1<=ar) or pl1<=al<=pr1:
    flag=True
    break
  if (al<pl2 and pl2<=ar) or pl2<=al<=pr2:
    flag=True
    break
if flag==True:
  print('YES')
else:
  print('NO')

# Fixed version:
n,a,b,c,d=map(int,input().split())
a,b=min(a,b),max(a,b)
pl1=b-d
pr1=b-c
pl2=b+c
pr2=b+d
flag=False
for i in range((n-2)//2+1):
  j=(n-2)-i*2
  al=a+j*c+i*(c-d)
  ar=a+j*d+i*(d-c)
  if (al<pl1 and pl1<=ar) or pl1<=al<=pr1:
    flag=True
    break
  if (al<pl2 and pl2<=ar) or pl2<=al<=pr2:
    flag=True
    break
if flag==True:
  print('YES')
else:
  print('NO')

# Buggy version:
N, A, B, C, D = map(int, raw_input().split())

for m in range(-N+1, N):
  if A-m*D+(N-m-1)*C <= B <= A-m*C+(N-m-1)*D:
    print "YES"
    exit(0)
print "NO"


# Fixed version:
N,A,B,C,D = map(int,input().split())
for m in range(N-1):
    if C*(N-1-m) - D*m <= B-A <= -C*m + (N-1-m)*D:
        print("YES")
        exit()
print("NO")

# Buggy version:
# -*- coding: utf-8 -*-
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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


def check(m):
    return C+(N-1-m)-D*m <= B-A <= -C*m+(N-1-m)*D


for m in range(N):
    if check(m):
        print("YES")
        break
else:
    print("NO")


# Fixed version:
# -*- coding: utf-8 -*-
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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


def check(m):
    return C*(N-1-m)-D*m <= B-A <= -C*m+(N-1-m)*D


for m in range(N):
    if check(m):
        print("YES")
        break
else:
    print("NO")

# Buggy version:
n,a,b,c,d =map(int,input().split())
n -= 1
ans1 = a + c*n+d
ans2 = a+d*n+c
for i in range(n):
  ans1 -= d
  ans2 -= c
  if (ans1<= b and b<ans2):
    print("YES")
    exit()
print("NO")

# Fixed version:
n, a, b, c, d = map(int, input().split())

for i in range(n):
    if c*(n-i-1)-d*i <= b-a and b-a <= d*(n-i-1)-c*i:
        print("YES")
        exit()
print("NO")

# Buggy version:
N, A, B, C, D = map(int, input().split())
for i in range(N):
    if -D*i + C*(N-1-i) <= B - A <= D*i - C*(N-1-i): print('YES'); break;
else:
    print('NO')

# Fixed version:
N, A, B, C, D = map(int, input().split())

for i in range(N-1):
    if C * (N-1-i) - D*i <= B-A <= D*(N-1-i) - C*i:
        print("YES")
        break
else: print("NO")

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

# Fixed version:
N, A, B, C, D = 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')

# Buggy version:
n,a,b,c,d =map(int,input().split())
n -= 1
for i in range(n,-n-1,-2):
  ans1 = a+c*i
  ans2 = a+d*i
  if (ans1<= b and b<ans2):
    print("YES")
    exit()
print("NO")

# Fixed version:
n,a,b,c,d =map(int,input().split())
n -= 1
ans1 = a + c*n+d+c
ans2 = a+d*n+c+d
for i in range(n+1):
  ans1 -= d+c
  ans2 -= c+d
  if (ans1<= b and b<=ans2):
    print("YES")
    exit()
print("NO")

# Buggy version:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, A, B, C, D):

    B -= A
    A = 0
    M = N - 1
    for i in range(N):
        u = i * D - (M-i) * C
        l = i * C - (M-i) * D
        if l <= A <= u:
            return 'Yes'

    return 'No'


def main():
    N, A, B, C, D = read_int_n()
    print(slv(N, A, B, C, D))


if __name__ == '__main__':
    main()


# Fixed version:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, A, B, C, D):

    B -= A
    A = 0
    M = N - 1
    for i in range(N):
        u = i * D - (M-i) * C
        l = i * C - (M-i) * D
        if l <= B <= u:
            return 'YES'

    return 'NO'


def main():
    N, A, B, C, D = read_int_n()
    print(slv(N, A, B, C, D))


if __name__ == '__main__':
    main()

# Buggy version:
N,A,B,C,D=map(int,input().split())
l=[]
for i in range(N+1):
    l.append(range(i*C-(N-i)*D,int(i*D-(N-i)*C/2)*2+2,2))
for _ in l:
    if B-A in _:
        print("YES")
        break
else:
    print("NO")



# Fixed version:
N,A,B,C,D=map(int,input().split())
N=N-1
l=[]
for i in range(0,N+1):
    l.append(range(i*C-(N-i)*D,i*D-(N-i)*C+1))

for _ in l:
    if B-A in _:
        print("YES")
        break
else:
    print("NO")