#include<cstdio>
using namespace std;
long long a,b,c,d;
int main()
{
//	freopen("B.in","r",stdin);
	int n;
	scanf("%d%lld%lld%lld%lld",&n,&a,&b,&c,&d);
	n--;
	long long l1,l2,r1,r2;
	for(int i=0;i<=n;i++)
	{
		l1=i*c,r1=i*d;
		l2=(n-i)*c,r2=(n-i)*d;
		if(b-a>=l2-r1&&b-a<=r2-l1)
		{
			printf("YES\n");
			return 0;
		}
	}
	printf("NO\n");
	return 0;
}
