#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:102400000,102400000")
int shuzu[1010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> shuzu[i];
  }
  int rest = n - shuzu[0];
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      shuzu[i] += rest;
    } else {
      shuzu[i] += n - rest;
    }
    shuzu[i] %= n;
  }
  for (int i = 0; i < n; i++) {
    if (shuzu[i] != i) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
