#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, d, e, i, j;
  cin >> a >> b >> c >> d >> e;
  for (i = b, j = d;; i++, j--) {
    if (i == j) {
      cout << "Yes" << endl;
      return 0;
    }
    if (i == c || j == e) break;
    if (i >= a) {
      i = 0;
    }
    if (j <= 1) {
      j = a + 1;
    }
  }
  cout << "No" << endl;
}
