#include <bits/stdc++.h>
using namespace std;
bool check(vector<long long> arr) {
  for (long long i = 0; i < arr.size(); i++) {
    if (arr[i] != i) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long a, b, n, i, j, x, ans = 0, c, x1, x2, u, max1 = 0, val, flag = 0;
  cin >> n;
  vector<long long> arr(n);
  for (i = 0; i < n; i++) cin >> arr[i];
  for (i = 0; i < 1000; i++) {
    if (check(arr)) {
      flag = 1;
      break;
    }
    for (j = 0; j < n; j++) {
      if (j % 2 == 0)
        arr[j] = (arr[j] + 1) % n;
      else {
        arr[j] = arr[j] - 1;
        if (arr[j] < 0) arr[j] += n;
      }
    }
  }
  if (flag)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
