#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,a,b,c,d,x,s,p;
    bool flag;
    cin>>n>>a>>b>>c>>d;
    flag=false;
    for(int i=0;i<=n-1;i++)
    {
        p=a+i*c-(n-1-i)*c;
        x=-(n-i-1)*(d-c);s=i*(d-c);
        if (p+x<=b && b<=p+s) flag=true;
    }
    if (flag) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
    return 0;
}