#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
ll n,a,b,c,d;
int main() {
  cin >> n >> a >> b >> c >> d;

  bool is = false;

  for(ll k = 0; k < n; k++) {
    if(((k * c - (n - 1 - k) * d) <= (b - a)) && ((b - a) <= (k * d - (n - 1 - k) * c)))
	is = true;

  }

  if(is) cout << "YES" << endl;
  else cout << "NO" <<endl;
}
      
  
