#include <bits/stdc++.h>
using namespace std;
const int Tmax = 1005;
int n, data[Tmax];
bool cmp() {
  for (int i = 1; i <= n; i++)
    if (data[i] != i - 1) return false;
  return true;
}
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &data[i]);
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++)
      if (j & 1 == 1)
        data[j] = (data[j] + n - 1) % n;
      else
        data[j] = (data[j] + 1) % n;
    if (cmp() == 1) {
      printf("Yes");
      return 0;
    }
  }
  printf("No");
  return 0;
}
