#include using ll = long long; using llu = long long unsigned; using namespace std; int main() { int N; cin >> N; vector A(N); ll sum = 0; for (auto &x:A) { cin >> x; sum+=x; } string ret = "Yes"; if (sum%N) { ret = "No"; } else { int mod = A[0]%N; if (mod < 0) { mod+=N; } for (auto x : A) { int tmp_mod = x%N; if (tmp_mod < 0) { tmp_mod+=N; } if (mod != tmp_mod) { ret = "No"; break; } } } cout << ret << endl; return 0; }