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

mx = n-1

for i in range(n):

    if a-d*i+c*(mx-i) <= b<=a-c*i+d*(mx-i):

        print('YES')

        exit()

print('NO')
def solve():

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

    mx = n-1

    for i in range(n):

        if a-d*i+c*(mx-i) <= b<=a-c*i+d*(mx-i):

            print('YES')

            return

    print('NO')

if __name__=='__main__':

    solve()
n, a, b, c, d = list(map(int, input().split()))
mx = n - 1
for i in range(n):
    if a - d * i + c * (mx - i) <= b <= a - c * i + d * (mx - i):
        print("YES")
        exit()
print("NO")

def solve():
    n, a, b, c, d = list(map(int, input().split()))
    mx = n - 1
    for i in range(n):
        if a - d * i + c * (mx - i) <= b <= a - c * i + d * (mx - i):
            print("YES")
            return
    print("NO")


if __name__ == "__main__":
    solve()

-n, a, b, c, d = list(map(int, input().split())) -mx = n - 1 -for i in range(n): -    if a - d * i + c * (mx - i) <= b <= a - c * i + d * (mx - i): -        print("YES") -        exit() -print("NO") +def solve(): +    n, a, b, c, d = list(map(int, input().split())) +    mx = n - 1 +    for i in range(n): +        if a - d * i + c * (mx - i) <= b <= a - c * i + d * (mx - i): +            print("YES") +            return +    print("NO") + + +if __name__ == "__main__": +    solve()