#include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main(){ ll N;cin>>N; vectorA(N); ll ans = 0; rep(i,N){ cin>>A[i]; ans += (A[0]-A[i])%1000000000; } if(ans%N==0)cout<<"Yes"<