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