#include <bits/stdc++.h>
using namespace std;
string ans[] = {"No\n", "Yes\n"};
int a[1006];
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int j = 1; j <= n + 1; j++) {
    bool f = true;
    for (int i = 1; i <= n; i++)
      if (a[i] != i - 1) f = false;
    if (f) {
      cout << ans[1];
      return 0;
    }
    for (int i = 1; i <= n; i++) {
      if (i & 1)
        a[i] = (a[i] - 1) % n;
      else
        a[i] = (a[i] + 1) % n;
      if (a[i] < 0) a[i] += n;
    }
  }
  cout << ans[0];
  return 0;
}
