#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main(){ ll n, a1; cin >> n; vector a(n); cin >> a[0]; for (int i = 1; i < n; i++){ cin >> a[i]; if (abs(a[i] - a[0])%n != 0){ cout << "No" << endl; return 0; } } cout << "Yes" << endl; }