#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int num[n];
    for (int i = 0; i < n; ++i) scanf("%d", &num[i]);
    int vis[n];
    int cnt = 0;
    bool ans = false;
    for (int i = 0; i < n; ++i) {
      cnt = 0;
      memset(vis, 0, sizeof(vis));
      for (int j = 0; j < n; ++j) {
        if ((j % 2) == 0)
          num[j] = (num[j] + 1) % n;
        else
          num[j] = (num[j] + n - 1) % n;
        if (j && num[j] == (num[j - 1] + 1)) {
          ++cnt;
        }
      }
      if (cnt == (n - 1)) {
        ans = true;
        break;
      }
    }
    if (ans)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
