# -*- coding: utf-8 -*-

import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll



def solve():

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

    A, B = 0, B - A

    if B < 0: B *= -1

    M = N - 1



    for i in range(0, N, 2):

        if C*(M - i) <= B <= (D - C)*((i + 1)/2) + D*(M - i):

            return True



    for i in range(N):

        if C*(M - i) - D*i <= B <= D*(M - i) - C*i:

            return True



    return False



print("YES" if solve() else "NO")



# -*- coding: utf-8 -*-

import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll



def solve():

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

    A, B = 0, B - A

    if B < 0: B *= -1

    M = N - 1



    for i in range(N):

        if C*(M - i) - D*i <= B <= D*(M - i) - C*i:

            return True



    return False



print("YES" if solve() else "NO")



# -*- coding: utf-8 -*-
import sys, copy, math, heapq, itertools as it, fractions, re, bisect, collections as coll


def solve():
    N, A, B, C, D = list(map(int, input().split()))
    A, B = 0, B - A
    if B < 0:
        B *= -1
    M = N - 1
    for i in range(0, N, 2):
        if C * (M - i) <= B <= (D - C) * ((i + 1) / 2) + D * (M - i):
            return True
    for i in range(N):
        if C * (M - i) - D * i <= B <= D * (M - i) - C * i:
            return True
    return False


print("YES" if solve() else "NO")

# -*- coding: utf-8 -*-
import sys, copy, math, heapq, itertools as it, fractions, re, bisect, collections as coll


def solve():
    N, A, B, C, D = list(map(int, input().split()))
    A, B = 0, B - A
    if B < 0:
        B *= -1
    M = N - 1
    for i in range(N):
        if C * (M - i) - D * i <= B <= D * (M - i) - C * i:
            return True
    return False


print("YES" if solve() else "NO")

-    for i in range(0, N, 2): -        if C * (M - i) <= B <= (D - C) * ((i + 1) / 2) + D * (M - i): -            return True