#include <bits/stdc++.h>
using namespace std;
int main() {
  int i;
  cin >> i;
  vector<int> V;
  for (int l = 0; l < i; l++) {
    int p;
    cin >> p;
    V.push_back(p);
  }
  bool f = true;
  for (int l = 0; l < i; l++) {
    for (int l1 = 0; l1 < i; l1++) {
      if (l1 % 2 == 0) {
        if (V[l1] != i - 1)
          V[l1] = V[l1] + 1;
        else
          V[l1] = 0;
      } else {
        if (V[l1] != 0)
          V[l1] = V[l1] - 1;
        else
          V[l1] = i - 1;
      }
    }
    bool flag = true;
    for (int l2 = 0; l2 < i; l2++) {
      if (V[l2] != l2) flag = false;
    }
    if (flag == true) {
      cout << "Yes";
      f = false;
      break;
    }
  }
  if (f == true) cout << "No";
}
