stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <functional>

#include <algorithm>

#include <iostream>

#include <cstring>

#include <cstdlib>

#include <cassert>

#include <sstream>

#include <numeric>

#include <string>

#include <vector>

#include <cstdio>

#include <bitset>

#include <cmath>

#include <ctime>

#include <queue>

#include <stack>

#include <map>

#include <set>



using namespace std;



#define forit(it, s) for(__typeof(s.begin()) it = s.begin(); it != s.end(); it++)

#define np(v) next_permutation(v.begin(), v.end())

#define pll pair < long long, long long>

#define all(a) a.begin(), a.end()

#define ull unsigned long long

#define pii pair < int, int >

#define sz(a) (int)a.size()

#define sqr(x) ((x) * (x))

#define y1 stupid_cmath

#define vi vector <int>

#define pb push_back

#define mp make_pair

#define ll long long

#define endl "\n"

#define s second

#define f first





const int inf = (int)1e9;

const int mod = (int)1e9 + 7;

const int N = (int)50505;

const double eps = 1e-9;

const double pi = acos(-1.0);



int n, x;



void solve(){

    cin >> n;

    int cnt = 0;

    for(int i = 1; i <= n; ++i){

        cin >> x;

        if(x & 1) cnt++;

    }

    if(n == 1){

        cout << "YES" << endl;

        return ;

    }

    if(cnt & 1){

        cout << "NO" << endl;

        return;

    }

    cout << "YES" << endl;

}



int main(){

    ios_base::sync_with_stdio(0), cin.tie(0);

    int T;

//    cin >> T;

    T = 1;

    for(int i = 1; i <= T; ++i){

        solve();

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.351533470131974x):
#include<cstdio>

#include<algorithm>

using namespace std;

#define MAXN 100005

int n,a[MAXN],sum;

int main()

{

	scanf("%d",&n);

	for(int i=1;i<=n;i++)

	{

		scanf("%d",&a[i]);

		sum+=a[i];

	}

	if(sum%2) printf("NO\n");

	else printf("YES\n");

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <iomanip>

#include <cstdio>

#include <string>

#include <cstring>

#include <deque>

#include <list>

#include <queue>

#include <stack>

#include <vector>

#include <utility>

#include <algorithm>

#include <map>

#include <set>

#include <complex>

#include <cmath>

#include <limits>

#include <cfloat>

#include <climits>

#include <ctime>

#include <cassert>

using namespace std;



#define rep(i,a,n) for(int (i)=(a); (i)<(n); (i)++)

#define repq(i,a,n) for(int (i)=(a); (i)<=(n); (i)++)

#define repr(i,a,n) for(int (i)=(a); (i)>=(n); (i)--)

#define all(v) begin(v), end(v)

#define pb(a) push_back(a)

#define fr first

#define sc second

#define INF 2000000000

#define int long long int



#define X real()

#define Y imag()

#define EPS (1e-10)

#define EQ(a,b) (abs((a) - (b)) < EPS)

#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )

#define LE(n, m) ((n) < (m) + EPS)

#define LEQ(n, m) ((n) <= (m) + EPS)

#define GE(n, m) ((n) + EPS > (m))

#define GEQ(n, m) ((n) + EPS >= (m))



typedef vector<int> VI;

typedef vector<VI> MAT;

typedef pair<int, int> pii;

typedef long long ll;



typedef complex<double> P;

typedef pair<P, P> L;

typedef pair<P, double> C;



int dy[]={0, 0, 1, -1};

int dx[]={1, -1, 0, 0};

int const MOD = 1000000007;



namespace std {

    bool operator<(const P& a, const P& b) {

        return a.X != b.X ? a.X < b.X : a.Y < b.Y;

    }

}



signed main() {

    int n; cin >> n;

    int a[100010] = {};

    int even = 0, odd = 0;

    rep(i,0,n) {

        cin >> a[i];

        if(a[i] % 2) odd++;

        else even++;

    }



    int e = odd / 2;

    even += e;

    odd -= e * 2;

    if(odd == 0) cout << "YES" << endl;

    else cout << "NO" << endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 9.501079378284397x):
#include <cstdio>

using namespace std;



int main() {

    int N, cnt = 0; scanf("%d", &N);

    for(int i=0; i<N; i++) {

        int p; scanf("%d", &p);

        cnt += (p % 2);

    }

    printf("%s\n", (cnt % 2) ? "NO" : "YES");

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <vector>

#include <cmath>

#include <cstring>

#include <numeric>

#include <algorithm>

#include <functional>

#include <array>

#include <map>

#include <queue>

#include <limits.h>

#include <set>

#include <stack>

#include <random>

#include <complex>

#include <unordered_map>

#define rep(i,s,n) for(int i = (s); (n) > i; i++)

#define REP(i,n) rep(i,0,n)

#define RANGE(x,a,b) ((a) <= (x) && (x) <= (b))

#define DUPLE(a,b,c,d) (RANGE(a,c,d) || RANGE(b,c,d) || RANGE(c,a,b) || RANGE(d,a,b))

#define INCLU(a,b,c,d) (RANGE(a,c,d) && (b,c,d))

#define PW(x) ((x)*(x))

#define ALL(x) (x).begin(), (x).end()

#define RALL(x) (x).rbegin(), (x).rend()

#define MODU 1000000007

#define bitcheck(a,b)   ((a >> b) & 1)

#define bitset(a,b)      ( a |= (1 << b))

#define bitunset(a,b)    (a &= ~(1 << b))

#define MP(a,b) make_pair((a),(b))

#define Manh(a,b) (abs((a).first-(b).first) + abs((a).second - ((b).second))

#define pritnf printf

#define scnaf scanf

#define itn int

#define PI 3.141592653589





#define izryt bool



using namespace std;

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

template<typename A, size_t N, typename T>

void Fill(A(&array)[N], const T &val) {

	std::fill((T*) array, (T*) (array + N), val);

}

pii Dir[8] = { //移動

	{ 0 ,1 },{ -1 ,0 },{ 1 ,0 },{ 0 ,-1 },

	{ 1 ,1 },{ 1 ,-1 },{ -1 ,1 },{ -1 ,-1 }

};





signed main() {

	int n;

	int odc = 0;

	scnaf("%d", &n);

	REP(i, n) {

		int a;

		scanf("%d", &a);

		odc += a % 2;

	}

	printf(odc%2 ? "NO\n" : "YES\n");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.24214033507297x):
#import<cstdio>

int n,a;bool f;main() {scanf("%d",&n);while(n--){scanf("%d",&a);f^=a&1;}puts(f?"NO\n":"YES\n");}
// Slower C++ solution:
#include <bits/stdc++.h>

#define fol(i,n) for(int i=0;i<n;i++)

using namespace std;

int main(){

    int n;cin>>n;

    int a,b=0,c=0;

    fol(i,n){

        cin>>a;

        a%2?c++:b++;

    }

    if(b>=0&&c%2==0){

        cout << "YES"<<endl;

    }else{

        cout << "NO" << endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.298832499050388x):
#include <cstdio>

#define fol(i,n) for(int i=0;i<n;i++)

using namespace std;

int main(){

    int n;scanf("%d",&n);

    int a,b=0,c=0;

    fol(i,n){

        scanf("%d",&a);

        a%2?c++:b++;

    }

    if(b>=0&&c%2==0){

        printf("YES\n");

    }else{

        printf("NO\n");

    }

    return 0;

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.565611408647911x):
#include<bits/stdc++.h>



using namespace std;



int main()

{

    int N,temp,c=0;



    cin >> N;



    for(int i=0; i<N; i++)

    {

        cin >> temp;

        if(temp%2) c++;

    }



    if(c%2==0) cout << "YES\n";

    else cout << "NO\n";

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.5179222259953837x):
/*  ***  In The Name of God ... ***  */

#include <bits/stdc++.h>



using namespace std ;



typedef long long ll ;

typedef long double ld ;





#define int long long

#define all(v) v.begin() , v.end()



template<typename T> inline bool smin(T &a, const T &b){ return b < a ? a = b,1:0;}

template<typename T> inline bool smax(T &a, const T &b){ return a < b ? a = b,1:0;}



int n , sum = 0 ; 



int32_t main()                     

{

	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

	cin >> n ;

	while ( n -- ) {

		int x ;

		cin >> x ;

		sum += x ; 

	}

	cout << ( sum & 1 ? "NO" : "YES" ) << '\n' ;

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.516493374862771x):
#include <bits/stdc++.h>



#define ll long long

#define pb push_back

#define vi vector<int>

#define sz(a) (int((a).size()))

#define mp make_pair

#define f first

#define s second

#define pii pair<int, int>



using namespace std;



const int N = 100100;

int n;

int a[N];

int cnt;



int main() {

	ios_base::sync_with_stdio(0), cin.tie(0);

	

	cin >> n;

	for (int i = 1; i <= n; i++) {

		cin >> a[i];

		cnt += a[i] & 1;

	}

	

	if (n == 1) {

		cout << "YES\n";

		return 0;

	}

	

	if (cnt & 1) {

		cout << "NO\n";

	} else {

		cout << "YES\n";

	}

				

	return 0;

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.5662754731692x):
#include <bits/stdc++.h>

using namespace std;

int main()

{

	int n ,k =0,k1 = 0 ;

	cin>>n;

	for(int i = 0 ; i < n ;i ++)

	{

		int l ;

		cin>>l;

		if(l % 2 == 0)

		{

		    k++;	

		}else

		{

			k1++;

		}

	}

	if(k1 == 1 && k ==0)

	{

		cout<<"YES";

		return 0;

	}

	if(k1 % 2 != 0 )

	{

		cout<<"NO";

	}else

	{

		cout<<"YES";

	}

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.605823829647216x):
#include <bits/stdc++.h>

using namespace std;



int main(){

	int n, num, cnt;

	scanf("%d",&n);

	cnt = 0;

	for (int i = 1; i <= n; i++){

		scanf("%d",&num);

		if (num & 1) cnt++;

	}

	if (cnt & 1) printf("NO\n");

	else printf("YES\n");

	return 0;

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.608885023781524x):
#include<bits/stdc++.h>

using namespace std;

template <typename T> inline void read(T &x)

{

	x=0;int f=1;char c=getchar();

	for(;c>'9'||c<'0';c=getchar())if(c=='-')f=-1;

	for(;c>='0'&&c<='9';c=getchar())x=(x<<1)+(x<<3)+(c^48);

	x*=f;

}

template <typename T> inline void print(T x)

{

	if(x<0) putchar('-'),x=-x;

	if(x>9) print(x/10);

	putchar(x%10+48);

}

long long s1[1010010],x,y,z,sum=0;

int main()

{

	read(x);

	for(register int i=1;i<=x;i++)

	{

		read(s1[i]);

		if(s1[i]%2!=0)

			sum++;

	}

	if(sum%2==0)

		cout<<"YES";

	else

		cout<<"NO";

	return 0;

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.604045595218736x):
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

ll arr[(int)1e6+5];

int main(){

	int n;

	scanf("%d",&n);

	ll odd=0,even=0;

	for(int i=0;i<n;i++){

		scanf("%lld",&arr[i]);

		if(arr[i]%2==0){

			even++;

		}

		

		else{

			odd++;

		}

	}

	even+=(odd/2);

	odd%=2;

	if(even>0) even=1;

	

	if(even+odd>1){

		printf("NO\n");

	}

	

	else{

		printf("YES\n");

	}

	

	

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.511864638513868x):
#include<bits/stdc++.h>

using namespace std;



typedef long long ll;



int main() {

	

	ios_base::sync_with_stdio(false);

	cin.tie(NULL);



	ll n, a, cnt = 0;

	cin>>n;



	while(n--) {

		cin>>a;

		cnt += a % 2;

	}



	if(cnt % 2 == 0) cout<<"YES"<<endl;

	else cout<<"NO"<<endl;

	

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.5651443837997596x):
#include <bits/stdc++.h>

 

using namespace std;



#define ll long long

#define vi vector<int> 

#define pb push_back

#define sz(s) (int)a.size()	



int n, a[1000001], cnt, cnt2;

 

int main(){

	cin >> n;

	for(int i = 0; i < n; i++){

		cin >> a[i];

		if(a[i] % 2 != 0){

			cnt += a[i];

		}

		else {

			cnt2 += a[i];

		}

	}

	if(cnt % 2 == 0 && cnt2 % 2 == 0){

		cout << "YES";

	}

	else {

		cout << "NO";

	}

	

	return 0;

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.5166784879718205x):
//#include<cstdio>

//#include<cassert>

//#include<iostream>

//#include<cstring>

//#include<algorithm>

#include<bits/stdc++.h>

#include<ext/pb_ds/assoc_container.hpp>

#include<ext/pb_ds/tree_policy.hpp>

#define MAX ((int)1e6 + 5)

#define MAXL ((ll)1e18 + 5)

#define MAX_X ((ll)1e5 + 2)

#define pi (2.0*acos(0))

#define M ((int)1e6 + 7)

#define MOD ((int)1e9 + 7)

#define NN ((int)1e6 + 7)

#define N ((int)2e5 + 7)

#define eps (0)

#define fastio ios_base::sync_with_stdio(false),cin.tie(NULL)

#define logn 29

#define endl "\n"

#define mp make_pair

#define BUCK 105

#define LEF (idx<<1)

#define RIG ((idx<<1)|1)

//#define int ll





using namespace std;

using namespace __gnu_pbds;



typedef long long ll;

typedef unsigned long long ull;



/*fast io

ios_base::sync_with_stdio(false);

cin.tie(NULL);

*/









typedef tree < pair < ll, pair < ll, ll > >,  null_type,  less < pair < ll, pair < ll, ll > > >,  rb_tree_tag,  tree_order_statistics_node_update > o_set;

/// o_set s;

/// s.order_of_key(k) : Number of items strictly smaller than k .

/// *(s.find_by_order(k)) : K-th element in a set (counting from zero).







int main()

{

    fastio;



    int n;



    cin>>n;



    int cnt = 0;



    for(int i = 1 ; i<=n ; i++){

        int a;

        cin>>a;

        cnt += a&1;

    }



    if(cnt&1) cout<<"NO\n";

    else cout<<"YES\n";



    return 0;

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.5171982499672714x):


///HELLO THERE~!

///CREATED BY MD SADMAN MEHEDI SIVAN(IUT CSE[SWE'19])



#include<bits/stdc++.h>

using namespace std;



#define FASTIO          ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);

#define READ            freopen("input.txt","r",stdin);

#define WRITE           freopen("red.txt","w",stdout);



using ll=long long;

using ull=unsigned long long;

const double pi = 2*acos(0.0);

const long long MX = 2e5+7;



int main()

{

    FASTIO;





    ll n;

    cin>>n;

    ll e=0,o=0;

    ll a[n+1];



    for(ll i=0; i<n; i++)

    {

        cin>>a[i];

        if(a[i]%2==0)

            e++;

        else

            o++;

    }

    ll r=o%2;

    ll g=e%2;

    if(o==0 && e>0)

    {

        cout<<"YES";

    }

    else if(e==0 && o>0)

    {

        if(o==1)

            cout<<"YES";

        else if(o%2==0)

            cout<<"YES";

        else

        {

            cout<<"NO";

        }

    }

    else if(o%2==0)

    {

        cout<<"YES";

    }

    else

    {

        cout<<"NO";

    }













    return 0;







}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.5663863154904547x):
#include<iostream>

using namespace std;

#include<bits/stdc++.h>

#define PI			2*acos(0.0)

int main()

{

    int n;

    cin >>n;

    int a[n],i,even=0,odd=0;

    for(i=0;i<n;i++)

    {

        cin >>a[i];

        if(a[i]%2)

            odd++;

        else

            even++;

    }

    if(odd%2)

        cout <<"NO";

    else

        cout <<"YES";

    return 0;

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.566203042294262x):
#include<bits/stdc++.h>

using namespace std;



int main()

{

    int n, i, a, o = 0;

    cin >> n;

    for(i = 0; i < n; i++)

    {

        cin >> a;

        if(a&1)

            o++;

    }



    cout << (o%2 == 0? "YES" : "NO");

}
// Slower C++ solution:
// be name khoda

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define pb push_back

const ll maxn=100009;

vector <ll> adj[maxn];

ll p[maxn]; ll s=0;

int main()

{

	ios_base::sync_with_stdio(false);

	ll n;	cin >> n; 

	for (ll i=0;i<n;i++)

	{

		ll x; cin>>x; s+=x;

	}

	if (s%2==0) cout<<"YES";

	else cout<<"NO";

}


// Faster C++ solution for the same problem (measured speedup: 3.516948665308033x):
/*    Mohammed Sami Khan

                       মোহাম্মদ সামী খান

*/

#include<bits/stdc++.h>

using namespace std;

#define pi acos(-1.0)

#define mp(a,b) make_pair(a,b)

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

typedef long long ll;

typedef unsigned long long ull;



bool sortbysecc(const pair<int,int> &a, const pair<int,int> &b){

    return (a.second < b.second);

}



int main()

{

    fastio;

    ll t, n, m, x=0, y=0, p, q, r, i, j, d, f=0;

    cin>>n;

    ll a[n];

    for(i=0;i<n;i++){

        cin>>a[i];

        if(a[i]%2) x++;

    }

    if(x%2) cout<<"NO";

    else cout<<"YES";

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<cmath>

using namespace std;

int main()

{

	int a,n[100005],ans;

	scanf("%d",&a);

	for(int i=1;i<=a;i++)

	{

		cin>>n[i];

		ans+=n[i];

	}

	if((ans%2)==0)	cout<<"YES"<<endl;

	else	cout<<"NO"<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.370562430772817x):
#include<cstdio>

int main(){

    int n,sum=0,tmp;

    scanf("%d",&n);

    for(register int i=1;i<=n;i++){

        scanf("%d",&tmp);

        sum+=tmp;

    }

    if(sum%2==0){

        printf("YES\n");

    }

    else{

        printf("NO\n");

    }

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	long long n,a[100000]={0},count=0;

	cin>>n;

	for(int i=1;i<=n;i++)

	{

		cin>>a[i];

		count+=a[i];

	}

	if(count%2==0)

	{

		cout<<"YES";

		return 0;

	 } 

	cout<<"NO";

	return 0;

 } 

// Faster C++ solution for the same problem (measured speedup: 1.8323556305512252x):
#include<bits/stdc++.h>

using namespace std;

long long n,a,ans;

int main(){

	scanf("%d",&n);

	for (int i=1;i<=n;i++){

		scanf("%d",&a);

		ans+=a;

	}

	if (ans%2==0) printf("YES\n");

	else printf("NO\n");

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <sstream>

#include <iomanip>

#include <cstdio>

#include <cstdlib>

#include <cmath>

#include <cctype>

#include <cstring>

#include <vector>

#include <list>

#include <queue>

#include <deque>

#include <stack>

#include <map>

#include <set>

#include <algorithm>

#include <iterator>

#include <bitset>

#include <ctime>

using namespace std;



#define F(i, n) for(int i = 0; i < n; ++i)

#define FOR(i,a,b) for (int i = (a); i < (b); i++)

#define RFOR(i,b,a) for (int i = (b)-1; i >= (a); i--)

#define ITER(it,a) for (__typeof(a.begin()) it = a.begin(); it != a.end(); it++)

#define FILL(a,value) memset(a, value, sizeof(a))



#define SZ(a) (int)a.size()

#define ALL(a) a.begin(), a.end()

#define PB push_back

#define MP make_pair



typedef long long LL;

typedef vector<int> VI;

typedef pair<int, int> PII;



const double PI = acos(-1.0);

const int INF = 1000 * 1000 * 1000 + 7;

const LL LINF = INF * (LL) INF;



const int MAX = 200*1000+47;





int main()

{

    int n;

    scanf("%d", &n);

    LL s = 0;

    FOR(i, 0, n)

    {

        int x;

        scanf("%d", &x);

        s += x;

    }

    if (s & 1)printf("NO\n");

    else printf("YES");

    

    

    

    

}




















// Faster C++ solution for the same problem (measured speedup: 5.231670011919037x):
#include <stdio.h>



#define endl '\n'



int main()

{

    int n, i, o=0;

    scanf("%d", &n);



    while(n--)

    {

        scanf("%d", &i);

        o+=i&1;

    }



    o&1? printf("NO"): printf("YES");



    return 0;

}