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