#!usr/bin/env python3

from collections import defaultdict,deque

from heapq import heappush, heappop

import sys

import math

import bisect

import random

def LI(): return [int(x) for x in sys.stdin.readline().split()]

def I(): return int(sys.stdin.readline())

def LS():return [list(x) for x in sys.stdin.readline().split()]

def S(): return list(sys.stdin.readline())[:-1]

def IR(n):

    return [I() for i in range(n)]

def LIR(n):

    return [LI() for i in range(n)]

def SR(n):

    return [S() for i in range(n)]

def LSR(n):

    return [LS() for i in range(n)]



sys.setrecursionlimit(1000000)

mod = 1000000007



#A

def A():

    n = I()

    b = LI()

    ans = []

    for j in range(n):

        for i in range(len(b))[::-1]:

            if b[i] == i+1:

                x = b.pop(i)

                ans.append(x)

                break

    if b:

        print(-1)

    else:

        print(*ans[::-1],sep = "\n")

    return



#B

def B():

    n,a,b,c,d = LI()

    s = S()

    a -= 1

    b -= 1

    c -= 1

    d -= 1

    k = b

    while b < d:

        if s[b+1] == ".":

            b += 1

        else:

            if s[b+2] == "#":

                print("No")

                return

            b += 2

    b = k

    if c < d:

        while a < c:

            if s[a+1] == ".":

                a += 1

            else:

                if s[a+2] == "#":

                    print("No")

                    return

                a += 2

        print("Yes")

    else:

        for i in range(b-1,d):

            if s[i:i+3].count(".") == 3:

                print("Yes")

                return

        print("No")

    return



#C

def C():

    n,a,b,c,d = LI()

    if abs(b-a) > (n-1)*d:

        print("NO")

        return

    if 2*c <= (n-1)*(d-c):

        print("YES")

        return

    mi = a-(n-1)*d

    m = c+d

    f = 1+(n-1)*(d-c)

    if f >= m:

        print("YES")

        return

    if (b-mi)%m < f:

        print("YES")

    else:

        print("NO")

    return



#D

def D():

    n = I()



    return



#E

def E():

    n = I()



    return



#F

def F():

    n = I()



    return



#Solve

if __name__ == "__main__":

    C()

#!usr/bin/env python3

from collections import defaultdict, deque

from heapq import heappush, heappop

from itertools import permutations, accumulate

import sys

import math

import bisect

def LI(): return [int(x) for x in sys.stdin.buffer.readline().split()]

def I(): return int(sys.stdin.buffer.readline())

def LS():return [list(x) for x in sys.stdin.readline().split()]

def S():

    res = list(sys.stdin.readline())

    if res[-1] == "\n":

        return res[:-1]

    return res

def IR(n):

    return [I() for i in range(n)]

def LIR(n):

    return [LI() for i in range(n)]

def SR(n):

    return [S() for i in range(n)]

def LSR(n):

    return [LS() for i in range(n)]



sys.setrecursionlimit(1000000)

mod = 1000000007



def solve():

    n,a,b,c,d = LI()

    b -= a

    n -= 1

    if b < -n*d or b > n*d:

        print("NO")

        return

    m = n*d

    x = -m

    y = n*(d-c)

    z = max(0,(n-1)*(c-d)+2*c)

    while x < m:

        if x <= b <= x+y:

            print("YES")

            return

        x += y+z

    print("NO")

    return



#Solve

if __name__ == "__main__":

    solve()

#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random


def LI():
    return [int(x) for x in sys.stdin.readline().split()]


def I():
    return int(sys.stdin.readline())


def LS():
    return [list(x) for x in sys.stdin.readline().split()]


def S():
    return list(sys.stdin.readline())[:-1]


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007
# A
def A():
    n = I()
    b = LI()
    ans = []
    for j in range(n):
        for i in range(len(b))[::-1]:
            if b[i] == i + 1:
                x = b.pop(i)
                ans.append(x)
                break
    if b:
        print(-1)
    else:
        print(*ans[::-1], sep="\n")
    return


# B
def B():
    n, a, b, c, d = LI()
    s = S()
    a -= 1
    b -= 1
    c -= 1
    d -= 1
    k = b
    while b < d:
        if s[b + 1] == ".":
            b += 1
        else:
            if s[b + 2] == "#":
                print("No")
                return
            b += 2
    b = k
    if c < d:
        while a < c:
            if s[a + 1] == ".":
                a += 1
            else:
                if s[a + 2] == "#":
                    print("No")
                    return
                a += 2
        print("Yes")
    else:
        for i in range(b - 1, d):
            if s[i : i + 3].count(".") == 3:
                print("Yes")
                return
        print("No")
    return


# C
def C():
    n, a, b, c, d = LI()
    if abs(b - a) > (n - 1) * d:
        print("NO")
        return
    if 2 * c <= (n - 1) * (d - c):
        print("YES")
        return
    mi = a - (n - 1) * d
    m = c + d
    f = 1 + (n - 1) * (d - c)
    if f >= m:
        print("YES")
        return
    if (b - mi) % m < f:
        print("YES")
    else:
        print("NO")
    return


# D
def D():
    n = I()
    return


# E
def E():
    n = I()
    return


# F
def F():
    n = I()
    return


# Solve
if __name__ == "__main__":
    C()

#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect


def LI():
    return [int(x) for x in sys.stdin.buffer.readline().split()]


def I():
    return int(sys.stdin.buffer.readline())


def LS():
    return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n, a, b, c, d = LI()
    b -= a
    n -= 1
    if b < -n * d or b > n * d:
        print("NO")
        return
    m = n * d
    x = -m
    y = n * (d - c)
    z = max(0, (n - 1) * (c - d) + 2 * c)
    while x < m:
        if x <= b <= x + y:
            print("YES")
            return
        x += y + z
    print("NO")
    return


# Solve
if __name__ == "__main__":
    solve()

+from itertools import permutations, accumulate -import random -    return [int(x) for x in sys.stdin.readline().split()] +    return [int(x) for x in sys.stdin.buffer.readline().split()] -    return int(sys.stdin.readline()) +    return int(sys.stdin.buffer.readline()) -    return list(sys.stdin.readline())[:-1] +    res = list(sys.stdin.readline()) +    if res[-1] == "\n": +        return res[:-1] +    return res -# A -def A(): -    n = I() -    b = LI() -    ans = [] -    for j in range(n): -        for i in range(len(b))[::-1]: -            if b[i] == i + 1: -                x = b.pop(i) -                ans.append(x) -                break -    if b: -        print(-1) -    else: -        print(*ans[::-1], sep="\n") -    return -# B -def B(): +def solve(): -    s = S() -    a -= 1 -    b -= 1 -    c -= 1 -    d -= 1 -    k = b -    while b < d: -        if s[b + 1] == ".": -            b += 1 -        else: -            if s[b + 2] == "#": -                print("No") -                return -            b += 2 -    b = k -    if c < d: -        while a < c: -            if s[a + 1] == ".": -                a += 1 -            else: -                if s[a + 2] == "#": -                    print("No") -                    return -                a += 2 -        print("Yes") -    else: -        for i in range(b - 1, d): -            if s[i : i + 3].count(".") == 3: -                print("Yes") -                return -        print("No") -    return - - -# C -def C(): -    n, a, b, c, d = LI() -    if abs(b - a) > (n - 1) * d: +    b -= a +    n -= 1 +    if b < -n * d or b > n * d: -    if 2 * c <= (n - 1) * (d - c): -        print("YES") -        return -    mi = a - (n - 1) * d -    m = c + d -    f = 1 + (n - 1) * (d - c) -    if f >= m: -        print("YES") -        return -    if (b - mi) % m < f: -        print("YES") -    else: -        print("NO") -    return - - -# D -def D(): -    n = I() -    return - - -# E -def E(): -    n = I() -    return - - -# F -def F(): -    n = I() +    m = n * d +    x = -m +    y = n * (d - c) +    z = max(0, (n - 1) * (c - d) + 2 * c) +    while x < m: +        if x <= b <= x + y: +            print("YES") +            return +        x += y + z +    print("NO") -    C() +    solve()