#include <bits/stdc++.h>
using namespace std;
int n;
int dat[2222];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> dat[i];
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (j % 2 == 0)
        dat[j]++;
      else
        dat[j]--;
      if (dat[j] < 0) dat[j] += n;
      if (dat[j] == n) dat[j] = 0;
    }
    int ff = true;
    for (int j = 0; j < n; ++j)
      if (dat[j] != j) {
        ff = 0;
        break;
      }
    if (ff) {
      return puts("Yes");
    }
  }
  cout << "No";
}
