#include <bits/stdc++.h>
using namespace std;
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  fastio();
  int i, j, t, n, m, k, s;
  cin >> n;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  s = n - a[0];
  for (i = 0; i < n; i++) {
    if (i % 2)
      a[i] += (n - s);
    else
      a[i] += s;
    a[i] %= n;
    if (a[i] != i) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
