#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(0); } int main() { fast_io(); int n; cin >> n; vector a(n); bool ans = true; for (int i = 0; i < n; i++) { cin >> a[i]; if ((a[i] - a[0]) % n != 0) { ans = false; } } cout << (ans ? "Yes\n" : "No\n"); }