#include #include #include using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int N; vector A; ll S; ll SdA; int main(){ cin >> N; A.resize(N); rep(i,N) cin >> A[i]; S = 0; rep(i,N) S += A[i]; if(S % N != 0){ cout << "No\n"; return 0; } SdA = 0; rep(i,N) SdA += max(A[i]-S/N,S/N-A[i]); if(SdA % 2 != 0){ cout << "No\n"; return 0; } cout << "Yes\n"; return 0; } struct ios_do_not_sync{ ios_do_not_sync(){ ios::sync_with_stdio(false); cin.tie(nullptr); } } ios_do_not_sync_inst;