#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  int arr[n];
  int i;
  for (i = 0; i < n; i++) scanf("%d", &arr[i]);
  int round = (n - arr[0]) % n;
  for (i = 0; i < n; i++) {
    if (i & 1) {
      arr[i] = (arr[i] - round) % n;
      if (arr[i] < 0) arr[i] += n;
    } else
      arr[i] = (arr[i] + round) % n;
  }
  bool isFake = false;
  for (i = 0; i < n; i++)
    if (arr[i] != i) {
      isFake = true;
      break;
    }
  if (isFake)
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
