#include <bits/stdc++.h>
using namespace std;

#define int long long

signed main() {
	int N, A, B, C, D;
	cin >> N >> A >> B >> C >> D;
	int k = abs(B - A);
	N--;
	int mn = N*C - k;
	int mx = N*D - k;
	for(int i=0;i<=N;i++){
		if (mn <= i*(C + D) && i*(C + D) <= mx) {
			cout << "YES" << endl;
			return 0;
		}
	}
	
		cout << "NO" << endl;
	
	return 0;
}