#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
using namespace std;
const int N = 1111;
int vec[N], n;
void rot() {
  for (int i = 0; i < n; i++) {
    int sig = (i % 2) ? -1 : 1;
    vec[i] = (vec[i] + sig + n) % n;
  }
}
bool good() {
  bool ok = true;
  for (int i = 0; i < n; i++) {
    ok &= vec[i] == i;
  }
  return ok;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int(i) = (0); (i) < (n); ++(i)) {
    cin >> vec[i];
  }
  bool ans = false;
  for (int i = 0; i < 1001; i++) {
    rot();
    ans |= good();
  }
  if (ans)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
