#include <bits/stdc++.h>
using namespace std;
int n;
bool solve(string &s) {
  if (s == "" || s.length() <= 1) return false;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] - '0' + s[i + 1] - '0' == 1) {
      s = s.substr(0, i) + s.substr(i + 2, n);
      return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int a[n], b[n];
  for (int i = (0); i < (n); ++i) {
    cin >> a[i];
    b[i] = a[i];
  }
  bool val = true;
  while (1) {
    val = true;
    for (int i = (0); i < (n); ++i) {
      if (i & 1) {
        if (a[i] == 0)
          a[i] = n - 1;
        else
          a[i] = (a[i] - 1) % n;
      } else
        a[i] = (a[i] + 1) % n;
    }
    for (int i = (0); i < (n); ++i)
      if (a[i] != i) {
        val = false;
        break;
      }
    if (val) break;
    int c = 0;
    for (int i = (0); i < (n); ++i) {
      if (a[i] == b[i])
        c++;
      else
        break;
    }
    if (c == n) {
      val = false;
      break;
    }
  }
  if (val)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
