#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, i, flag = 0;
  cin >> n;
  long int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long int a;
  a = (n - 1) - arr[0] + 1;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0)
      arr[i] = (arr[i] + a) % n;
    else {
      arr[i] = arr[i] - a;
      if (arr[i] < 0) {
        arr[i] = -arr[i];
        arr[i] = n - arr[i];
      }
    }
    if (arr[i] != i) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
}
