#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int SIZE = 1e6 + 10;
int a[SIZE];
bool check(int n) {
  for (int i = 0; i < (n); ++i)
    if (a[i] != i) return 0;
  return 1;
}
int main() {
  int(n);
  scanf("%d", &n);
  for (int i = 0; i < (n); ++i) scanf("%d", &(a[i]));
  for (int i = 0; i < (n); ++i) {
    if (check(n)) return 0 * puts("Yes");
    for (int i = 0; i < (n); ++i) {
      if (i & 1)
        a[i] = (a[i] + n - 1) % n;
      else
        a[i] = (a[i] + 1) % n;
    }
  }
  puts("No");
  return 0;
}
