#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, moves = 0, flag = 1, gears;
  cin >> n;
  cin >> gears;
  moves = n - gears;
  for (i = 1; i < n; i++) {
    cin >> gears;
    if (i % 2 == 1)
      gears = (gears + (n - moves)) % n;
    else
      gears = (gears + moves) % n;
    if (gears != i) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
