#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, c = 1, count, count_no, m;
  cin >> n;
  m = n;
  long long a[n], b[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  while (1) {
    n = m;
    count = 0;
    count_no = 0;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0) {
        b[i] = (b[i] + 1) % n;
      } else {
        b[i] = (b[i] - 1) % n;
        if (b[i] == -1) b[i] += n;
      }
    }
    for (int j = 0; j < n; j++) {
      if (b[j] == j) count++;
    }
    for (int j = 0; j < n; j++) {
      if (b[j] == a[j]) count_no++;
    }
    if (count == n) {
      cout << "Yes";
      break;
    } else if (count_no == n) {
      cout << "No";
      break;
    }
  }
  return 0;
}
