#include<bits/stdc++.h>
#define LL long long
using namespace std;
const int maxn=500000;
LL x[maxn];
LL a,b,c,d;
LL n;

int main()
{
    scanf("%lld%lld%lld%lld%lld",&n,&a,&b,&c,&d);
    for(int i=0;i<=n-1;i++){
        if(c*(n-1-i)-d*i<=b-a&&d*(n-1-i)-c*i>=b-a){
            printf("YES");
            return 0;
        }
    }
    printf("NO");
    return 0;
}
