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