#include <bits/stdc++.h>
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int p(int x, int y) {
  int temp;
  if (y == 0) return 1;
  temp = p(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
int main(void) {
  int i, j, k, n;
  scanf("%d", &n);
  int ar[n];
  int f = 0;
  for (i = 0; i < n; i++) scanf("%d", &ar[i]);
  for (i = 0; i < n; i++) {
    if (ar[i] != i) {
      f = 1;
      break;
    }
  }
  if (f == 0) {
    printf("Yes\n");
    return 0;
  }
  k = n - 1;
  for (j = 1; j <= k; j++) {
    for (i = 0; i < n; i++) {
      if (i % 2 == 0)
        ar[i] = (ar[i] + 1) % n;
      else {
        if (ar[i] == 0)
          ar[i] = n - 1;
        else
          ar[i] = ar[i] - 1;
      }
    }
    int cnt = 0;
    for (i = 0; i < n; i++) {
      if (ar[i] == i)
        cnt++;
      else
        break;
    }
    if (cnt == n) {
      printf("Yes\n");
      break;
    }
  }
  if (j == n) printf("No\n");
  return 0;
}
