#include <bits/stdc++.h>
using namespace std;
int minu(int a, int b, int base) { return (base - 1) - (b - a - 1); }
int main() {
  int n;
  int change;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int val;
    int a;
    cin >> a;
    if (i == 0) change = n - a;
    if (i % 2 == 0) {
      val = (a + change) % n;
    } else {
      if (a - change > 0) {
        val = (a - change) % n;
      } else {
        val = minu(a, change, n);
      }
    }
    if (val != i) {
      cout << "No" << '\n';
      return 0;
    }
  }
  cout << "Yes" << '\n';
  return 0;
}
