#include <bits/stdc++.h>
using namespace std;
int n, a, x, b, y;
int main() {
  cin >> n;
  cin >> a;
  cin >> x;
  cin >> b;
  cin >> y;
  while (a != b && a != x && b != y) {
    if (a < n) {
      a++;
    } else {
      a = 1;
    }
    if (b > 1) {
      b--;
    } else {
      b = n;
    }
  }
  if (a == b) {
    cout << 'y' << 'e' << 's';
  } else {
    cout << 'n' << 'o';
  }
  return 0;
}
