#include <bits/stdc++.h>
using namespace std;
long long n, m, i, j, k, t, ans;
int main() {
  ios_base::sync_with_stdio(0);
  static const size_t npos = -1;
  cin >> n;
  long long a[n + 1];
  map<long long, long long> mp;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  j = n - a[1];
  for (i = 2; i <= n; i++) {
    if (i % 2 == 0) {
      if (((a[i] - j + n) % n) != (i - 1)) {
        cout << "No" << endl;
        return 0;
      }
    } else {
      if ((a[i] + j) % n != (i - 1)) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
