#include <bits/stdc++.h>
using namespace std;
int main() {
  int gear, x, change;
  vector<int> v, cycle;
  cin >> gear;
  for (int i = 0; i < gear; i++) {
    cin >> x;
    v.push_back(x);
    cycle.push_back(x);
  }
  while (1) {
    change = 1;
    for (int i = 0; i < v.size(); i++) {
      if (change) {
        if (v[i] + 1 >= gear)
          v[i] = 0;
        else
          v[i]++;
      } else {
        if (v[i] - 1 < 0)
          v[i] = gear - 1;
        else
          v[i]--;
      }
      change = 1 - change;
    }
    x = 0;
    for (int i = 0; i < v.size(); i++) {
      if (v[i] == i) x++;
    }
    if (x == cycle.size()) {
      x = 1;
      break;
    }
    x = 0;
    for (int i = 0; i < v.size(); i++) {
      if (cycle[i] == v[i]) x++;
    }
    if (x == cycle.size()) {
      x = 0;
      break;
    }
  }
  if (x)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
