#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, l, i, j = 0, s = 0, a, b, x, y;
  cin >> n >> a >> x >> b >> y;
  while (a != x && b != y) {
    a++;
    b--;
    if (b == 0 && b != y) b = n;
    if (a == n + 1 && a != x) a = 1;
    if (a == b) {
      cout << "yes";
      j = 1;
      break;
    }
    if (a == x || b == y) break;
  }
  if (j != 1) cout << "no";
  return 0;
}
