import std.algorithm;
import std.stdio;

bool solve (long n, long a, long b, long c, long d)
{
	foreach (i; 0..n)
	{
		long pos = a + c * i - d * (n - 1 - i);
		long right = pos + (d - c) * (n - 1);
		debug {writeln (pos, " ", right);}
		if (pos <= b && b <= right)
		{
			return true;
		}
	}
	return false;
}

void main ()
{
	long n, a, b, c, d;
	while (readf (" %s %s %s %s %s", &n, &a, &b, &c, &d) > 0)
	{
		writeln (solve (n, a, b, c, d) ? "YES" : "NO");
	}
}
