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