#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n], i, j, f;
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++) {
    f = 0;
    for (j = 0; j < n; j++) {
      if (a[j] != j) {
        f = 1;
      }
    }
    if (f == 0) {
      cout << "Yes";
      return 0;
    }
    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 (f == 1) cout << "No";
  return 0;
}
