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