#include <bits/stdc++.h>
using namespace std;
int n, m, i, a[1005];
int main() {
  std::ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  m = n - 1 - a[0] + 1;
  for (int i = 1; i < n; i++) {
    if (i % 2 == 1)
      a[i] = (a[i] - m + n) % n;
    else
      a[i] = (a[i] + m) % n;
    if (a[i] != i) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
