#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, x, b, y;
  cin >> n >> a >> x >> b >> y;
  int f = 0;
  for (int i = a, j = b;; i++, j--) {
    if (i == j) {
      f = 1;
      break;
    }
    if (i == x || j == y) break;
    if (i == n) {
      i -= n;
    }
    if (j == 1) {
      j += n;
    }
  }
  if (f == 0)
    cout << "no" << endl;
  else
    cout << "yes" << endl;
}
