#include using namespace std; int main() { cin.tie(nullptr)->sync_with_stdio(false); int N; cin >> N; int last = -1; for (int i = 0; i < N; ++i) { int a; cin >> a; a = (a % N + N) % N; if (last == -1) last = a; if (last != a) { puts("No"); return 0; } } puts("Yes"); }