#include <bits/stdc++.h>
using namespace std;
const long long N = 1e3 + 7;
long long a[N];
bool prime[N];
void seive() {
  for (int i = 2; i <= N; i++) prime[i] = 1;
  for (int i = 2; i <= N; i++)
    for (int j = 2; j * i <= N; j++) prime[j * i] = 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  long long int r, e, t, x, y, z, d, n, i, j, k, l, m, h = 0, u, p, cnt, mod;
  string s;
  mod = 1000000007;
  cin >> n;
  d = 0;
  int a[2009];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    h = 1;
    for (j = 0; j < n; j++) {
      if (a[j] != j) h = 0;
    }
    if (h) {
      cout << "Yes";
      d++;
      break;
    } else {
      for (j = 0; j < n; j++) {
        if (j % 2 == 0)
          a[j] = (a[j] + 1) % n;
        else
          a[j] = (a[j] + n - 1) % n;
      }
    }
  }
  if (d == 0) cout << "No";
}
