#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

int main(void){
  long long int n,a,b,c,d;

  cin>>n>>a>>b>>c>>d;

  long long int i;
  for(i=0;i<n;i++){
    if((i*c-(n-1-i)*d<=b-a)&&((b-a)<=(i*d-(n-1-i)*c))){
      cout<<"YES"<<endl;
      return 0;
    }
  }
  cout<<"NO"<<endl;
  return 0;
}