#include <bits/stdc++.h>
using namespace std;
int a[1005];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i <= n; i++) cin >> a[i];
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j < n; j++) {
      if (j % 2) {
        a[j]--;
        if (a[j] < 0) a[j] = n - 1;
      } else {
        a[j]++;
        a[j] %= n;
      }
    }
    bool flag = true;
    for (int j = 0; j < n; j++) {
      if (a[j] == j)
        continue;
      else {
        flag = false;
        break;
      }
    }
    if (flag) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
