#include <bits/stdc++.h>
using namespace ::std;
bool done(int my_a[], int n) {
  for (int i = 0; i < n; i++)
    if (my_a[i] != i) return 0;
  return 1;
}
int main() {
  int n;
  int my_arr[1234];
  bool flag = 0;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> my_arr[i];
  for (int j = 0; j < n; j++)
    if (done(my_arr, n) == 1)
      flag = 1;
    else {
      for (int k = 0; k < n; k += 2) {
        my_arr[k] = (my_arr[k] + n + 1) % n;
        my_arr[k + 1] = (my_arr[k + 1] + n - 1) % n;
      }
      if (done(my_arr, n) == 1) flag = 1;
    }
  if (flag == 0)
    cout << "No";
  else
    cout << "Yes";
}
