#include <bits/stdc++.h>
using namespace std;
long long n, m, i, ans1 = 0, ans2 = 0;
vector<vector<int>> g;
long long a[100000] = {0};
string s;
int main() {
  cin >> n;
  g.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    g[i].resize(n);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (!(j & 1)) {
        a[j]++;
        if (a[j] == n) a[j] = 0;
      } else {
        a[j]--;
        if (a[j] < 0) a[j] = n - 1;
      }
    }
    for (int j = 0; j < n; ++j) g[i].push_back(a[j]);
  }
  int x;
  for (int i = 0; i < n; ++i) {
    ans1 = 0;
    x = 1;
    for (int j = n + 1; j < 2 * n && x; ++j)
      if (g[i][j - 1] >= g[i][j]) x = 0;
    if (x) break;
  }
  if (x)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
