#include <iostream>
#include <algorithm>
using namespace std;
using ll = long long;

int main(){
  ll n, a, b, c, d;
  cin >> n >> a >> b >> c >> d;
  
  n--;
  for(int k=0; k<=n; k++){
    ll r = a + d*k - c*(n-k);
    ll l = a + c*k - d*(n-k);

    if(l <= b && b <= r){
      cout << "YES" << endl;
      return 0;
    }
  }

  cout << "NO" << endl;

  return 0;
}
