#include <bits/stdc++.h>
using namespace std;
struct point {
  int x;
  int y;
};
int mas[1004];
int main() {
  int n;
  cin >> n;
  int flag = 0;
  for (int i = 0; i < n; i++) {
    cin >> mas[i];
  }
  for (int i = 0; i < 2000; i++) {
    for (int j = 0; j < n; j++) {
      if (j % 2 == 0) {
        mas[j]++;
        mas[j] %= n;
      } else {
        if (mas[j] > 0)
          mas[j]--;
        else
          mas[j] = n - 1;
      }
    }
    for (int j = 1; j < n; j++)
      if (mas[0] == 0) {
        if (mas[j] == (mas[j - 1] + 1)) {
          flag++;
        }
      }
    if (flag == n - 1) {
      cout << "Yes\n";
      return 0;
    }
    flag = 0;
  }
  cout << "No\n";
  return 0;
}
