#include using namespace std; int main() { int N; cin >> N; vector a( N ); for( int i = 0; i < N; i++ ) cin >> a[i]; long long l = -1e9 - 1, h = 1e9 + 1; while( h - l > 1 ) { long long m = (l + h) / 2; long long p = 0, np = 0; for( int i = 0; i < N; i++ ) { if( a[i] > m ) p += a[i] - m; else if( a[i] < m ) np += m - a[i]; } if( p == np ) { cout << "Yes" << endl; return 0; } if( p > np ) l = m; else h = m; } cout << "No" << endl; }