// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



#define FOR(i,a,b) for(int i = (a); i < (b); i++)

#define RFOR(i,b,a) for(int i = (b) - 1; i >= (a); i--)

#define ITER(it, a) for(typeof(a.begin()) it = a.begin(); it != a.end(); it++)

#define FILL(a, value) memset(a, value, sizeof(a))



#define SZ(a) (int) a.size()

#define ALL(a) a.begin(),a.end()

#define PB push_back

#define MP make_pair



typedef long long LL;

typedef vector<int> VI;

typedef pair<int, int> PII;



const double PI = acos(-1.0);

const LL INF = 1000 * 1000 * 1000 + 7;

const LL LINF = INF * (LL)INF;



const int MAX = 500500;



LL L[MAX], R[MAX];

LL U[MAX], D[MAX];



bool intersect(LL x1, LL y1, LL x2, LL y2)

{

	if (y1 < x2) return false;

	if (y2 < x1) return false;

	return true;

}



int main()

{

	//freopen("in.txt", "r", stdin);

	//ios::sync_with_stdio(false); cin.tie(0);



	LL n, a, b, c, d;

	cin>>n>>a>>b>>c>>d;



	L[0] = R[0] = a;

	FOR (i, 1, n)

	{

		L[i] = L[i-1] + c;

		R[i] = R[i-1] + d;

	}



	U[n-1] = D[n-1] = b;

	RFOR(i, n-1, 0)

	{

		D[i] = D[i+1] + c;

		U[i] = U[i+1] + d;

	}



	FOR (i, 0, n)

	{

		if (intersect(L[i], R[i], D[i], U[i]))

		{

			cout<<"YES"<<endl;

			return 0;

		}

	}



	cout<<"NO"<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 2.6455359590057115x):
/*Bismillahir Rahmanir Rahim*///{

#include <bits/stdc++.h>

#include <ext/numeric>

using namespace std; using __gnu_cxx::power;

using ll = long long; using ull = unsigned long long; using ld = long double;

const ll llinf = (1ll<<61)-1; const double eps = 1e-6, ldeps = 1e-9;

struct Dbg { static constexpr auto &os = cout;   // replace by cerr in interactive.

template<class C> static auto dud(C *x)->decltype(os << *x, 0);

template<class C> static char dud(...);

template<class C> typename enable_if<sizeof dud<C>(0)!=1,Dbg&>::type operator<<(const C &x) {os<<x; return *this;}

template<class C> Dbg &dump(C b, C e) {

    for (struct{C i;int j;} i={(*this<<"\n[",b),0}; i.i!=e and i.j<26; i.i++, i.j++) *this<<", "+2*(i.i==b)<<*i.i;

    return *this << ']';

}

template<class C> typename enable_if<sizeof dud<C>(0)==1, Dbg&>::type operator<<(const C &x) {

    return dump(begin(x), end(x));

}

template<class C, size_t X> typename enable_if<!is_same<C, const char>::value, Dbg&>::type operator<<(C (&x)[X]) {

    return dump(begin(x), end(x));

}

template<class B, class C> Dbg &operator<<(const pair<B, C> &x) {return *this<<'{'<<x.first<<", "<<x.second<<'}';}

Dbg &operator<<(ostream&(*x)(std::ostream&)) { os << x; return *this; }

} dbg;

void err(istringstream *iss) { delete iss; }

template<class C, class... Args> void err(istringstream *iss, const C &val, const Args &... args) {

    string name; *iss >> name; if (name.back()==',') name.pop_back();

    dbg << name << " = " << val << "; ", err(iss, args...);

}

#define bug(args...) dbg << __LINE__ << ": ", err(new istringstream(#args), args), dbg << endl

#define cbug(a, args...) if (a) bug(args);

#define ASSERT(a, o, b, args...) if (!((a)o(b))) bug(a, b, ##args), assert((a)o(b));

#define sl(a) int(strlen(a))

#define sz(a) int(a.size())

int T, Q, cn;//}

const int inf = 1000000007, mxn = 500005;



#define yes return cout << "YES\n", 0

#define no return cout << "NO\n", 0

#define YN(x) return cout << ((x) ? "YES\n" : "NO\n"), 0



int n, a, b, c, d;



signed main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); cout.precision(11), cout.setf(ios::fixed);

    /*for (int c = 0; c<10; c++) {

        for (int d = c; d<10; d++) {

            n = 20;

            bitset<52> possible[52];

            memset(possible, 0, sizeof(possible));

            possible[0][25] = 1;

            for (int i = 1; i <= n; i++) {

                for (int j = c; j <= d; j++) {

                    possible[i] |= possible[i-1]<<j, possible[i] |= possible[i-1]>>j;

                }bug(possible[i]);

            }bug(c, d, possible[n]);

        }

    }*/



    cin >> n >> a >> b >> c >> d;

    a = abs(a-b), --n;

    ll tmp = d*ll(n);

    if (a > tmp) no;

    YN((tmp-a)%(c+d) < 1+n*ll(d-c));

}