#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#define LL long long
using namespace std;
LL n,a,b,c,d;
int main(){
	scanf("%lld%lld%lld%lld%lld",&n,&a,&b,&c,&d);
	for(int i(0);i<=n-1;i++){
		if(((n-1-i)*c-i*d)<=b-a and b-a<=((n-1-i))*d-i*c){
			printf("YES");
			return 0;
		}
	}
	printf("NO");
	return 0;
}