#include <iostream>
#include <algorithm>
#include <string>
#define int long long
using namespace std;
signed main() {
	int n, a, b, c, d; cin >> n >> a >> b >> c >> d;
	n--;
	for (int i = 0; i <= n; i++) {
		int max, min;
		max = i * d - (n - i)*c;
		min = i * c - (n - i)*d;
		if (a + min <= b && b <= a + max) {
			cout << "YES\n";
			return 0;
		}
	}
	cout << "NO\n";
}