#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1010;
int N, A[MAXN];
int need[MAXN];
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
  }
  ios::sync_with_stdio(false);
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    if (i % 2 == 0) {
      need[i] = (i - A[i] + 3 * N) % N;
    } else {
      need[i] = (A[i] - i + 3 * N) % N;
    }
    if (need[i] != need[0]) {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
}
