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

typedef long long ll;

int main(){
	ll N,A,B,C,D;
	scanf("%lld%lld%lld%lld%lld",&N,&A,&B,&C,&D);
	ll di=B-A;
	ll a,b,m;
	for(a=0;a<=N-1;a++){
		b=N-1-a;
		m=a-b;
		ll Min=(a-b)*C+b*(C-D);
		ll Max=(a-b)*C+a*(D-C);
		if(di<=Max&&di>=Min){
			printf("YES");
			return 0;
		}
	}
	printf("NO");
	return 0;
}