#include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int N, i; cin >> N; vector A(N); for (i = 0; i != N; ++i) cin >> A[i], A[i] += 1'000'000'000; for (i = 1; i != N; ++i) if (A[i] % N != A[0] % N) { cout << "No\n"; return 0; } cout << "Yes\n"; return 0; }