#include <bits/stdc++.h>
using namespace std;
bool checa(vector<int> s) {
  int a = s[0], p;
  int l = s.size();
  for (int i = 1; i < l; i++) {
    if (i % 2 == 0)
      p = (i + a) % l;
    else
      p = (i - a) % l;
    if (p < 0) p = l + p;
    if (s[i] != p) return false;
  }
  return true;
}
int main(int argc, const char* argv[]) {
  int n, d;
  vector<int> data;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> d;
    data.push_back(d);
  }
  cout << (checa(data) ? "Yes" : "No") << endl;
  return 0;
}
