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