#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    cin >> a;
    v.push_back(a);
  }
  for (int j = 0; j < n; j++) {
    if (v[0] == 0) break;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0) {
        v[i]++;
        if (v[i] == n) v[i] = 0;
      } else {
        v[i]--;
        if (v[i] < 0) v[i] += n;
      }
    }
  }
  bool ok = true;
  for (int i = 0; i < n; i++) {
    if (v[i] != i) ok = false;
  }
  if (ok)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
