#include <cstdio>

#define R register
typedef long long ll;
int main()
{
	R int n, a, b, c, d; scanf("%d%d%d%d%d", &n, &a, &b, &c, &d);
	--n;
	R ll l = -1ll * n * d, r = -1ll * n * c;
	for (R int i = 0; i <= n; ++i)
	{
//		printf("%d %d\n", l, r);
		if (l <= b - a && b - a <= r) return puts("YES"), 0;
		l += d + c;
		r += d + c;
	}
	puts("NO");
	return 0;
}