#include <bits/stdc++.h>
using namespace std;
int a[1000];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int ans = (n - a[0]) % n;
  for (int i = 1; i < n; i++) {
    switch (i % 2) {
      case 1:
        if (ans != (a[i] - i + n) % n) {
          cout << "No" << endl;
          return 0;
        }
        break;
      case 0:
        if (ans != (i - a[i] + n) % n) {
          cout << "No" << endl;
          return 0;
        }
        break;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
