#include <bits/stdc++.h>
using namespace std;
int n;
int arr[1100];
void GetIn() {
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    getchar();
  }
}
int Check() {
  int j = n - arr[0] % n;
  for (int i = 0; i < n; i++)
    if (i % 2 == 0) {
      if ((arr[i] + j) % n != i) {
        cout << "No" << endl;
        return 0;
      }
    } else if ((abs(arr[i] + n - j) % n) != i) {
      cout << "No" << endl;
      return 0;
    }
  cout << "Yes" << endl;
}
int main() {
  while (scanf("%d", &n) != EOF) {
    GetIn();
    Check();
  }
}
