#include <bits/stdc++.h>
using namespace std;
int main() {
  int c[1010];
  int n;
  scanf("%d", &n);
  int b[1010];
  for (int i = 0; i < n; i++) scanf("%d", &b[i]);
  int jd = 1;
  int num = n - b[0];
  for (int i = 1; i < n; i++) {
    int x;
    if (i % 2 == 1) {
      x = (b[i] + n - num) % n;
    }
    if (i % 2 == 0) {
      x = (b[i] + num) % n;
    }
    if (x != i) {
      jd = 0;
      break;
    }
  }
  if (jd == 1)
    printf("Yes\n");
  else
    printf("No\n");
}
