#include <bits/stdc++.h>
int a[1000000];
int main() {
  int n, i, count, flag, k;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  count = 0;
  while (1) {
    if (a[0] == 0)
      break;
    else {
      a[0] = (a[0] + 1) % n;
      count++;
    }
  }
  for (i = 1; i < n; i++) {
    if (i % 2 != 0) {
      for (k = 1; k <= count; k++) {
        if (a[i] == 0)
          a[i] = n - 1;
        else
          a[i] = a[i] - 1;
      }
    } else {
      a[i] = (a[i] + count) % n;
    }
  }
  flag = 0;
  for (i = 0; i < n; i++) {
    if (a[i] != i) {
      flag = 1;
      break;
    }
  }
  if (flag == 1)
    printf("No\n");
  else
    printf("Yes\n");
  return 0;
}
