#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, arr[2000], x = 0, wel;
  bool b = true;
  cin >> n;
  for (i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  wel = arr[0];
  while (wel != 0) {
    wel++;
    x++;
    wel = wel % n;
  }
  for (i = 0; i < n; ++i) {
    if (i % 2 == 0) {
      arr[i] = (arr[i] + x);
      arr[i] = arr[i] % n;
    } else {
      arr[i] = arr[i] - x;
      if (arr[i] < 0) {
        arr[i] = n + arr[i];
      }
    }
  }
  for (i = 0; i < n; ++i) {
    if (arr[i] != i) {
      b = false;
      break;
    }
  }
  if (b) {
    cout << "Yes" << endl;
  } else
    cout << "No" << endl;
}
