#include <bits/stdc++.h>
using namespace std;
int n, a[1100], b[1100];
bool tod() {
  for (int i = 0; i <= n - 1; i++) {
    if (i % 2 == 0) {
      a[i]++;
      a[i] %= n;
    } else {
      if (a[i] == 0)
        a[i] = n - 1;
      else
        a[i]--;
    }
  }
  for (int i = 0; i <= n - 1; i++) {
    if (a[i] != i) return 0;
  }
  return 1;
}
int main() {
  cin >> n;
  for (int i = 0; i <= n - 1; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  while (1) {
    if (tod()) {
      cout << "Yes";
      return 0;
    }
    bool ok = 1;
    for (int i = 0; i <= n - 1; i++)
      if (a[i] != b[i]) ok = 0;
    if (ok) break;
  }
  cout << "No";
  return 0;
}
