#include<bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int t;
    cin >> t;

    while(t--){
        int n;
        cin >> n;

        int even=0;
        int odd=0;

        int arr[n];
        for(int i=0; i<n; i++){
            cin>>arr[i];
            if(arr[i]%2==0){
                even++;
            } else {
                odd++;
            }
        }

        if(odd%2 != even%2){
            cout << "NO" << endl;
        } else {
            if (even%2==0){
                cout << "YES" << endl;
            } else {
                bool flag = true;
                for (int i = 0; i < n; i++) {
                    if(flag){
                        break;
                    }
                    for (int j = i + 1; j < n; j++) {
                        if (arr[i] % 2 != arr[j] % 2 && abs(arr[i] - arr[j]) == 1) {
                            cout << "YES" <<  endl;
                            flag = false;
                            break;
                        }
                    }
                }
                if(flag){
                    cout << "NO" << endl;
                }
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int t;
    cin >> t;

    while(t--){
        int n;
        cin >> n;
        int arr[n];
        for(int i=0; i<n; i++){
            cin >> arr[i];
        }
        sort(arr, arr+n);
        bool flag=true;
        bool check1 = (arr[1]-arr[0] == 1); // tova da e 1
        bool check2 = (arr[0]%2 == arr[1]%2); //tova da e vqrno
        if(check1 || check2){
            for(int i=3; i<n-2; i+=2){
                check1 = (arr[i]-arr[i-1] == 1);
                check2 = (arr[i]%2 == arr[i-1]%2);
                if(!(check1 || check2)){
                    cout << "NO" << endl;
                    flag=false;
                    break;
                }
            }
            if(flag){
                cout << "YES" << endl;
            }
        } else {
            cout << "NO" << endl;
        }

    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int t;
    cin >> t;

    while(t--){
        int n;
        cin >> n;

        int even=0;
        int odd=0;

        int arr[n];
        for(int i=0; i<n; i++){
            cin>>arr[i];
            if(arr[i]%2==0){
                even++;
            } else {
                odd++;
            }
        }

        if(odd%2 != even%2){
            cout << "NO" << endl;
        } else {
            if (even%2==0){
                cout << "YES" << endl;
            } else {
                bool flag = true;
                for (int i = 0; i < n; i++) {
                    if(!flag){
                        break;
                    }
                    for (int j = i + 1; j < n; j++) {
                        if (arr[i] % 2 != arr[j] % 2 && abs(arr[i] - arr[j]) == 1) {
                            cout << "YES" <<  endl;
                            flag = false;
                            break;
                        }
                    }
                }
                if(flag){
                    cout << "NO" << endl;
                }
            }
        }
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL)
#define ll long long
#define int long long
#define ull unsigned long long
#define ld long double
#define sb __builtin_popcount
#define vi vector<int>
#define vc vector<char>
#define ii pair<int, int>
#define pq priority_queue<ii, vector<ii>, greater<ii>>
#define vii vector<ii>
#define sz(a) int((a).size())
#define f(a, b) for (int i = a; i < b; i++)
#define fr(a, b) for (int i = a - 1; i >= b; i--)
#define tr(x, m) for (auto x : m)
#define in(a, b) (b.find(a) != string::npos)
#define minin(a) *min_element(all(a))
#define maxin(a) *max_element(all(a))
#define X first
#define Y second
#define fill(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define pf push_front
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) reverse(v.begin(), v.end())
#define unq(v) v.erase(unique(all(v)), v.end())
#define el "\n"
#define mx3(a, b, c) max(max(a, b), c)
#define mn3(a, b, c) min(min(a, b), c)
#define S(v) accumulate(all(v), (ll)0)
#define SP(n) cout.precision(n)
#define PI = atan(1.0) * 4.0;
#define MOD = 1e9 + 7;
void start() {
    fio;
    SP(10);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
int32_t main() {
    start();
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        int x;
        vi v;
        map<int, int> mp , mpp;
        for (int i = 0; i < n; i++) {
            cin >> x;
            v.pb(x);
            mp[x]++;
        }
        vector<pair<int, int>> vv;
        for (auto x : mp)vv.pb({x.X, x.Y});

        for (int i = 1; i < vv.size(); i++) {
            if (vv[i].X - vv[i - 1].X == 1) {
                int xx = min(vv[i].Y, vv[i - 1].Y);
                vv[i].Y -= xx;
                vv[i - 1].Y -= xx;
                //cout << i << el;
            }
        }
        //for (auto x : vv)cout << x.X << " " << x.Y << el;
        for (int i = 0; i < vv.size(); i++) {
            mpp[vv[i].X % 2] += vv[i].Y;
        }
        if (mpp[0] % 2 == 0 && mpp[1] % 2 == 0)cout << "YES" << el;
        else cout << "NO" << el;
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL)
#define ll long long
#define int long long
#define ull unsigned long long
#define ld long double
#define sb __builtin_popcount
#define vi vector<int>
#define vc vector<char>
#define ii pair<int, int>
#define pq priority_queue<ii, vector<ii>, greater<ii>>
#define vii vector<ii>
#define sz(a) int((a).size())
#define f(a, b) for (int i = a; i < b; i++)
#define fr(a, b) for (int i = a - 1; i >= b; i--)
#define tr(x, m) for (auto x : m)
#define in(a, b) (b.find(a) != string::npos)
#define minin(a) *min_element(all(a))
#define maxin(a) *max_element(all(a))
#define X first
#define Y second
#define fill(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define pf push_front
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) reverse(v.begin(), v.end())
#define unq(v) v.erase(unique(all(v)), v.end())
#define el "\n"
#define mx3(a, b, c) max(max(a, b), c)
#define mn3(a, b, c) min(min(a, b), c)
#define S(v) accumulate(all(v), (ll)0)
#define SP(n) cout.precision(n)
#define PI = atan(1.0) * 4.0;
#define MOD = 1e9 + 7;
void start() {
    fio;
    SP(10);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
int32_t main() {
    start();
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        int x;
        vi v;
        map<int, int> mp , mpp , mppp;
        for (int i = 0; i < n; i++) {
            cin >> x;
            v.pb(x);
            mppp[x]++;
        }
        sort(all(v));
        for (int i = 0; i < n; i++) {
            if (mp.find(v[i]) != mp.end())continue;

            if (mp.find(v[i]) == mp.end() && mp.find(v[i] + 1) == mp.end() && mppp.find(v[i] + 1) != mppp.end()) {
                mp[v[i]] = 1;
                mp[v[i] + 1] = 1;
            }
        }
        //for (auto x : mp)cout << x.X << " ";
        //cout << el;
        for (int i = 0; i < n; i++) {
            if (mp.find(v[i]) == mp.end()) {
                mpp[v[i] % 2]++;
            }
        }
        int od = mpp[0], ev = mpp[1];
        //cout << od << " " << ev << el;
        if (od % 2 == 0 && ev % 2 == 0) {
            cout << "YES" << el;
        }
        else cout << "NO" << el;
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL)
#define ll long long
#define int long long
#define ull unsigned long long
#define ld long double
#define sb __builtin_popcount
#define vi vector<int>
#define vc vector<char>
#define ii pair<int, int>
#define pq priority_queue<ii, vector<ii>, greater<ii>>
#define vii vector<ii>
#define sz(a) int((a).size())
#define f(a, b) for (int i = a; i < b; i++)
#define fr(a, b) for (int i = a - 1; i >= b; i--)
#define tr(x, m) for (auto x : m)
#define in(a, b) (b.find(a) != string::npos)
#define minin(a) *min_element(all(a))
#define maxin(a) *max_element(all(a))
#define X first
#define Y second
#define fill(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define pf push_front
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) reverse(v.begin(), v.end())
#define unq(v) v.erase(unique(all(v)), v.end())
#define el "\n"
#define mx3(a, b, c) max(max(a, b), c)
#define mn3(a, b, c) min(min(a, b), c)
#define S(v) accumulate(all(v), (ll)0)
#define SP(n) cout.precision(n)
#define PI = atan(1.0) * 4.0;
#define MOD = 1e9 + 7;
void start() {
    fio;
    SP(10);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
int32_t main() {
    start();
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        int x;
        vi v, vv;
        map<int, int> mp;
        for (int i = 0; i < n; i++) {
            cin >> x;
            v.pb(x);
            mp[x % 2]++;
        }
        sort(all(v));
        for (int i = 1; i < n; i++) {
            if (abs(v[i] - v[i - 1]) == 1) {
                vv.pb(v[i]);
                vv.pb(v[i - 1]);
                mp[v[i] % 2]--;
                mp[v[i - 1] % 2]--;
                i++;
            }
        }
        if (mp[0] % 2 == 0 && mp[1] % 2 == 0)cout << "YES" << el;
        else cout << "NO" << el;

    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL)
#define ll long long
#define int long long
#define ull unsigned long long
#define ld long double
#define sb __builtin_popcount
#define vi vector<int>
#define vc vector<char>
#define ii pair<int, int>
#define pq priority_queue<ii, vector<ii>, greater<ii>>
#define vii vector<ii>
#define sz(a) int((a).size())
#define f(a, b) for (int i = a; i < b; i++)
#define fr(a, b) for (int i = a - 1; i >= b; i--)
#define tr(x, m) for (auto x : m)
#define in(a, b) (b.find(a) != string::npos)
#define minin(a) *min_element(all(a))
#define maxin(a) *max_element(all(a))
#define X first
#define Y second
#define fill(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define pf push_front
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) reverse(v.begin(), v.end())
#define unq(v) v.erase(unique(all(v)), v.end())
#define el "\n"
#define mx3(a, b, c) max(max(a, b), c)
#define mn3(a, b, c) min(min(a, b), c)
#define S(v) accumulate(all(v), (ll)0)
#define SP(n) cout.precision(n)
#define PI = atan(1.0) * 4.0;
#define MOD = 1e9 + 7;
void start() {
    fio;
    SP(10);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
int32_t main() {
    start();
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        int x;
        vi v;
        map<int, int> mp , mpp , mppp , mm;
        for (int i = 0; i < n; i++) {
            cin >> x;
            v.pb(x);
            mppp[x]++;
            mm[x % 2]++;
        }
        if (mm[0] % 2 == 0 && mm[1] % 2 == 0) {
            cout << "YES" << el;
        }
        else {
            sort(all(v));
            for (int i = 0; i < n; i++) {
                if (mp.find(v[i]) != mp.end())continue;

                if (mp.find(v[i]) == mp.end() && mp.find(v[i] + 1) == mp.end() && mppp.find(v[i] + 1) != mppp.end()) {
                    mp[v[i]] = 1;
                    mp[v[i] + 1] = 1;
                }
            }
            for (int i = 0; i < n; i++) {
                if (mp.find(v[i]) == mp.end()) {
                    mpp[v[i] % 2]++;
                }
            }
            int od = mpp[0], ev = mpp[1];
            if (od % 2 == 0 && ev % 2 == 0) {
                cout << "YES" << el;
            }
            else cout << "NO" << el;
        }
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL)
#define ll long long
#define int long long
#define ull unsigned long long
#define ld long double
#define sb __builtin_popcount
#define vi vector<int>
#define vc vector<char>
#define ii pair<int, int>
#define pq priority_queue<ii, vector<ii>, greater<ii>>
#define vii vector<ii>
#define sz(a) int((a).size())
#define f(a, b) for (int i = a; i < b; i++)
#define fr(a, b) for (int i = a - 1; i >= b; i--)
#define tr(x, m) for (auto x : m)
#define in(a, b) (b.find(a) != string::npos)
#define minin(a) *min_element(all(a))
#define maxin(a) *max_element(all(a))
#define X first
#define Y second
#define fill(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define pf push_front
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) reverse(v.begin(), v.end())
#define unq(v) v.erase(unique(all(v)), v.end())
#define el "\n"
#define mx3(a, b, c) max(max(a, b), c)
#define mn3(a, b, c) min(min(a, b), c)
#define S(v) accumulate(all(v), (ll)0)
#define SP(n) cout.precision(n)
#define PI = atan(1.0) * 4.0;
#define MOD = 1e9 + 7;
void start() {
    fio;
    SP(10);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
int32_t main() {
    start();
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        int x;
        vi v, vv;
        map<int, int> mp;
        for (int i = 0; i < n; i++) {
            cin >> x;
            v.pb(x);
            mp[x % 2]++;
        }
        if (mp[0] % 2 == 0 && mp[1] % 2 == 0)cout << "YES" << el;
        else {
            sort(all(v));
            for (int i = 1; i < n; i++) {
                if (abs(v[i] - v[i - 1]) == 1) {
                    vv.pb(v[i]);
                    vv.pb(v[i - 1]);
                    mp[v[i] % 2]--;
                    mp[v[i - 1] % 2]--;
                    i++;
                    break;
                }
            }
            if (mp[0] % 2 == 0 && mp[1] % 2 == 0)cout << "YES" << el;
            else cout << "NO" << el;
        }

    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL)
#define ll long long
#define int long long
#define ull unsigned long long
#define ld long double
#define sb __builtin_popcount
#define vi vector<int>
#define vc vector<char>
#define ii pair<int, int>
#define pq priority_queue<ii, vector<ii>, greater<ii>>
#define vii vector<ii>
#define sz(a) int((a).size())
#define f(a, b) for (int i = a; i < b; i++)
#define fr(a, b) for (int i = a - 1; i >= b; i--)
#define tr(x, m) for (auto x : m)
#define in(a, b) (b.find(a) != string::npos)
#define minin(a) *min_element(all(a))
#define maxin(a) *max_element(all(a))
#define X first
#define Y second
#define fill(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define pf push_front
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) reverse(v.begin(), v.end())
#define unq(v) v.erase(unique(all(v)), v.end())
#define el "\n"
#define mx3(a, b, c) max(max(a, b), c)
#define mn3(a, b, c) min(min(a, b), c)
#define S(v) accumulate(all(v), (ll)0)
#define SP(n) cout.precision(n)
#define PI = atan(1.0) * 4.0;
#define MOD = 1e9 + 7;
void start() {
    fio;
    SP(10);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
int32_t main() {
    start();
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        int x;
        vi v;
        map<int, int> mp , mpp;
        for (int i = 0; i < n; i++) {
            cin >> x;
            v.pb(x);
            mp[x]++;
        }
        if (mp[0] % 2 == 0 && mp[1] % 2 == 0)cout << "YES" << el;
        else {
            vector<pair<int, int>> vv;
            for (auto x : mp)vv.pb({x.X, x.Y});
            for (int j = 0; j < vv.size(); j++) {
                for (int i = 0; i < vv.size(); i++) {
                    if (abs(vv[j].X - vv[i].X) == 1) {
                        int xx = min(vv[j].Y, vv[i].Y);
                        vv[j].Y -= xx;
                        vv[i].Y -= xx;
                    }
                }
            }
            for (int i = 0; i < vv.size(); i++) {
                mpp[vv[i].X % 2] += vv[i].Y;
            }
            if (mpp[0] % 2 == 0 && mpp[1] % 2 == 0)cout << "YES" << el;
            else cout << "NO" << el;
        }
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL)
#define ll long long
#define int long long
#define ull unsigned long long
#define ld long double
#define sb __builtin_popcount
#define vi vector<int>
#define vc vector<char>
#define ii pair<int, int>
#define pq priority_queue<ii, vector<ii>, greater<ii>>
#define vii vector<ii>
#define sz(a) int((a).size())
#define f(a, b) for (int i = a; i < b; i++)
#define fr(a, b) for (int i = a - 1; i >= b; i--)
#define tr(x, m) for (auto x : m)
#define in(a, b) (b.find(a) != string::npos)
#define minin(a) *min_element(all(a))
#define maxin(a) *max_element(all(a))
#define X first
#define Y second
#define fill(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define pf push_front
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) reverse(v.begin(), v.end())
#define unq(v) v.erase(unique(all(v)), v.end())
#define el "\n"
#define mx3(a, b, c) max(max(a, b), c)
#define mn3(a, b, c) min(min(a, b), c)
#define S(v) accumulate(all(v), (ll)0)
#define SP(n) cout.precision(n)
#define PI = atan(1.0) * 4.0;
#define MOD = 1e9 + 7;
void start() {
    fio;
    SP(10);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
int32_t main() {
    start();
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        int x;
        vi v, vv;
        map<int, int> mp;
        for (int i = 0; i < n; i++) {
            cin >> x;
            v.pb(x);
            mp[x % 2]++;
        }
        if (mp[0] % 2 == 0 && mp[1] % 2 == 0)cout << "YES" << el;
        else {
            sort(all(v));
            for (int i = 1; i < n; i++) {
                if (abs(v[i] - v[i - 1]) == 1) {
                    vv.pb(v[i]);
                    vv.pb(v[i - 1]);
                    mp[v[i] % 2]--;
                    mp[v[i - 1] % 2]--;
                    i++;
                }
            }
            if (mp[0] % 2 == 0 && mp[1] % 2 == 0)cout << "YES" << el;
            else cout << "NO" << el;
        }

    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL)
#define ll long long
#define int long long
#define ull unsigned long long
#define ld long double
#define sb __builtin_popcount
#define vi vector<int>
#define vc vector<char>
#define ii pair<int, int>
#define pq priority_queue<ii, vector<ii>, greater<ii>>
#define vii vector<ii>
#define sz(a) int((a).size())
#define f(a, b) for (int i = a; i < b; i++)
#define fr(a, b) for (int i = a - 1; i >= b; i--)
#define tr(x, m) for (auto x : m)
#define in(a, b) (b.find(a) != string::npos)
#define minin(a) *min_element(all(a))
#define maxin(a) *max_element(all(a))
#define X first
#define Y second
#define fill(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define pf push_front
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) reverse(v.begin(), v.end())
#define unq(v) v.erase(unique(all(v)), v.end())
#define el "\n"
#define mx3(a, b, c) max(max(a, b), c)
#define mn3(a, b, c) min(min(a, b), c)
#define S(v) accumulate(all(v), (ll)0)
#define SP(n) cout.precision(n)
#define PI = atan(1.0) * 4.0;
#define MOD = 1e9 + 7;
void start() {
    fio;
    SP(10);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
int32_t main() {
    start();
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        int x;
        vi v;
        map<int, int> mp , mpp;
        for (int i = 0; i < n; i++) {
            cin >> x;
            v.pb(x);
            mp[x]++;
        }
        if (mp[0] % 2 == 0 && mp[1] % 2 == 0)cout << "YES" << el;
        else {
            vector<pair<int, int>> vv;
            for (auto x : mp)vv.pb({x.X, x.Y});

            for (int i = 1; i < vv.size(); i++) {
                if (vv[i].X - vv[i - 1].X == 1) {
                    int xx = min(vv[i].Y, vv[i - 1].Y);
                    vv[i].Y -= xx;
                    vv[i - 1].Y -= xx;
                }
            }
            for (int i = 0; i < vv.size(); i++) {
                mpp[vv[i].X % 2] += vv[i].Y;
            }
            if (mpp[0] % 2 == 0 && mpp[1] % 2 == 0)cout << "YES" << el;
            else cout << "NO" << el;
        }
    }
    return 0;

}


#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i=n-1 ; i > =0; i--)
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std;
typedef long long int ll;
struct pair_hash {
    inline std::size_t operator()(const std::pair<int,int> & v) const {
        return v.first*31+v.second;
    }
};
void solve(){

	ll q,e=0,o=0;
	cin>>q;
	std::vector<int> v(q);

	rep(i,q){
		cin>>v[i];
	}
	sort(all(v));
	for(int i=0;i<q;i++)
	{
		if(i<q-1&&v[i+1]-v[i]==1)
			i++;
		else if(v[i]%2==0)e++;
		else if(v[i]%2!=0)o++;

	}
	// cout<<e<<" "<<o<<"\n";
	if(e%2==0&&o%2==0)
		cout<<"YES\n";
	else
		cout<<"NO\n";

}
int main(){

	//#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//#endif
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;

	int _;
	cin>>_;
	while(_--)solve();
}


#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i=n-1 ; i > =0; i--)
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std;
typedef long long int ll;
struct pair_hash {
    inline std::size_t operator()(const std::pair<int,int> & v) const {
        return v.first*31+v.second;
    }
};
void solve(){

	ll q,e=0,o=0;
	cin>>q;
	std::vector<int> v(q),arr;

	rep(i,q){
		cin>>v[i];
	}
	sort(all(v));
	for(int i=1;i<=q;i++)
	{
		if(i!=q&&v[i]-v[i-1]==1)
			i++;
		else
			arr.pb(v[i-1]);

	}
	sort(all(arr));
	for(int i=0;i<arr.size();i++)
	{
		// cout<<arr[i]<<" ";
		if(arr[i]%2==0)e++;
		else o++;
	}
	if(e%2==0&&o%2==0)
		cout<<"YES\n";
	else
		cout<<"NO\n";

}
int main(){

	//#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//#endif
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;

	int _;
	cin>>_;
	while(_--)solve();
}


#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i=n-1 ; i > =0; i--)
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std;
typedef long long int ll;
struct pair_hash {
    inline std::size_t operator()(const std::pair<int,int> & v) const {
        return v.first*31+v.second;
    }
};
void solve(){

	ll q,e=0,o=0;
	cin>>q;
	std::vector<int> v(q);
	int arr[101]={0};

	rep(i,q){
		cin>>v[i];
		arr[v[i]]++;
	}
	sort(all(v));
	for(int i=1;i<q;i++)
	{
		if((v[i]-v[i-1]==1||v[i]-v[i-1]==0)&&(v[i]!=0&&v[i-1]!=0))
			v[i]=0,v[i-1]=0;

		// else if(v[i]%2==0)e++;
		// else if(v[i]%2!=0)o++;

	}
	rep(i,q)
	{
		if(v[i]%2==0&&v[i]!=0)
			e++;
		else if(v[i]!=0&&v[i]%2!=0)
			o++;
	}
	// cout<<e<<" "<<o<<"\n";
	if(e%2==0&&o%2==0)
		cout<<"YES\n";
	else
		cout<<"NO\n";

}
int main(){

	//#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//#endif
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;

	int _;
	cin>>_;
	while(_--)solve();
}


#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i=n-1 ; i > =0; i--)
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std;
typedef long long int ll;
struct pair_hash {
    inline std::size_t operator()(const std::pair<int,int> & v) const {
        return v.first*31+v.second;
    }
};
void solve(){

	ll q,e=0,o=0;
	cin>>q;
	std::vector<int> v(q);
	int a[101]={0};
	rep(i,q){
		cin>>v[i];
		a[v[i]]++;
	}
	for(int i=1;i<=100;i++)
	{
		int x=min(a[i],a[i+1]);
		a[i]-=x;
		a[i+1]-=x;
		if(i%2==0)e+=a[i];
		else o+=a[i];
	}
	if(e%2==0&&o%2==0)
		cout<<"YES\n";
	else
		cout<<"NO\n";

}
int main(){

	//#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//#endif
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;

	int _;
	cin>>_;
	while(_--)solve();
}


#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i=n-1 ; i > =0; i--)
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std;
typedef long long int ll;
struct pair_hash {
    inline std::size_t operator()(const std::pair<int,int> & v) const {
        return v.first*31+v.second;
    }
};
void solve(){

	ll q,e=0,o=0;
	cin>>q;
	std::vector<int> v(q);

	rep(i,q){
		cin>>v[i];
	}
	sort(all(v));
	for(int i=1;i<q;i++)
	{
		if(v[i]-v[i-1]==1)
			v[i]=0,v[i-1]=0;

		// else if(v[i]%2==0)e++;
		// else if(v[i]%2!=0)o++;

	}
	rep(i,q)
	{
		if(v[i]%2==0&&v[i]!=0)
			e++;
		else if(v[i]!=0&&v[i]%2!=0)
			o++;
	}
	// cout<<e<<" "<<o<<"\n";
	if(e%2==0&&o%2==0)
		cout<<"YES\n";
	else
		cout<<"NO\n";

}
int main(){

	//#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//#endif
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;

	int _;
	cin>>_;
	while(_--)solve();
}


#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i=n-1 ; i > =0; i--)
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std;
typedef long long int ll;
struct pair_hash {
    inline std::size_t operator()(const std::pair<int,int> & v) const {
        return v.first*31+v.second;
    }
};
void solve(){

	ll q,e=0,o=0;
	cin>>q;
	std::vector<int> v(q);

	rep(i,q){
		cin>>v[i];
	}
	sort(all(v));
	for(int i=1;i<q;i++)
	{
		if(v[i]-v[i-1]==1)
			v[i]=0,v[i-1]=0;

		// else if(v[i]%2==0)e++;
		// else if(v[i]%2!=0)o++;

	}
	rep(i,q)
	{
		if(v[i]%2==0&&v[i]!=0)
			e++;
		else
			o++;
	}
	// cout<<e<<" "<<o<<"\n";
	if(e%2==0&&o%2==0)
		cout<<"YES\n";
	else
		cout<<"NO\n";

}
int main(){

	//#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//#endif
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;

	int _;
	cin>>_;
	while(_--)solve();
}


#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i=n-1 ; i > =0; i--)
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std;
typedef long long int ll;
struct pair_hash {
    inline std::size_t operator()(const std::pair<int,int> & v) const {
        return v.first*31+v.second;
    }
};
void solve(){

	ll q,e=0,o=0;
	cin>>q;
	std::vector<int> v(q);
	int a[1000]={0};
	rep(i,q){
		cin>>v[i];
		a[v[i]]++;
	}
	for(int i=1;i<=100;i++)
	{
		int x=min(a[i],a[i+1]);
		a[i]-=x;
		a[i+1]-=x;
		if(i%2==0)e+=a[i];
		else o+=a[i];
	}
	if(e%2==0&&o%2==0)
		cout<<"YES\n";
	else
		cout<<"NO\n";

}
int main(){

	//#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//#endif
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;

	int _;
	cin>>_;
	while(_--)solve();
}


#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i=n-1 ; i > =0; i--)
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std;
typedef long long int ll;
struct pair_hash {
    inline std::size_t operator()(const std::pair<int,int> & v) const {
        return v.first*31+v.second;
    }
};
void solve(){

	ll q,e=0,o=0;
	cin>>q;
	std::vector<int> v(q),arr;

	rep(i,q){
		cin>>v[i];
	}
	sort(all(v));
	for(int i=1;i<=q;i++)
	{
		if(v[i]-v[i-1]==1&&i!=q)
			i++;
		else
			arr.pb(v[i-1]);

	}
	sort(all(arr));
	for(int i=0;i<arr.size();i++)
	{
		// cout<<arr[i]<<" ";
		if(arr[i]%2==0)e++;
		else o++;
	}
	if(e%2==0&&o%2==0)
		cout<<"YES\n";
	else
		cout<<"NO\n";

}
int main(){

	//#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//#endif
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;

	int _;
	cin>>_;
	while(_--)solve();
}


#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i=n-1 ; i > =0; i--)
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std;
typedef long long int ll;
struct pair_hash {
    inline std::size_t operator()(const std::pair<int,int> & v) const {
        return v.first*31+v.second;
    }
};
void solve(){

	ll q,e=0,o=0;
	cin>>q;
	std::vector<int> v(q);
	int a[101]={0};
	rep(i,q){
		cin>>v[i];
		a[v[i]]++;
	}
	for(int i=1;i<=101;i++)
	{
		int x=min(a[i],a[i+1]);
		a[i]-=x;
		a[i+1]-=x;
		if(i%2==0)e+=a[i];
		else o+=a[i];
	}
	if(e%2==0&&o%2==0)
		cout<<"YES\n";
	else
		cout<<"NO\n";

}
int main(){

	//#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//#endif
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;

	int _;
	cin>>_;
	while(_--)solve();
}


#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i=n-1 ; i > =0; i--)
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std;
typedef long long int ll;
struct pair_hash {
    inline std::size_t operator()(const std::pair<int,int> & v) const {
        return v.first*31+v.second;
    }
};
void solve(){

	ll q,e=0,o=0,count=0;
	cin>>q;
	std::vector<int> v(q);
	int a[1000]={0};
	rep(i,q){
		cin>>v[i];
		a[v[i]]++;
		if(v[i]%2==0)e++;
		else o++;
	}
	for(int i=1;i<=100;i++)
	{
		int x=min(a[i],a[i+1]);
		count+=x;
		a[i]-=x;
		a[i+1]-=x;

	}
	// cout<<count<<" "<<e<<" "<<o<<endl;
	if(e%2==0&&o%2==0)
		cout<<"YES"<<endl;
	else if(e%2==o%2&&count>0)
		cout<<"YES"<<endl;
	else
		cout<<"NO"<<endl;

}
int main(){

	//#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//#endif
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;

	int _;
	cin>>_;
	while(_--)solve();
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                if (index >= even.size()) {
                    if (abs(odd[odd.size() - 1] - even[j]) == 1 ){
                        cout<<"YES"<<endl;
                        bla = true;
                        break;
                    }

                }else if (index == 0) {
                    if(abs(odd[index] - even[j]) == 1) {
                        cout<<"YES"<<endl;
                            bla = true;
                        break;
                    }
                }
                else if(abs(odd[index] - even[j]) == 1 || abs(odd[index - 1] - even[j])) {
                    cout<<"YES"<<endl;
                        bla = true;
                        break;
                }
            }
            if  (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                vector<int>::iterator lower1;
                upper1 = std::lower_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                int jindex = lower1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1 || odd[odd.size() - 1] - even[j] == 1 ){
                        cout<<"YES"<<endl;
                        bla = true;
                    }
                }
                if (jindex >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1 || odd[odd.size() - 1] - even[j] == 1 ){
                        cout<<"YES"<<endl;
                        bla = true;
                    }
                }
                if(odd[index] - even[j] == 1 || even[j] - odd[index] == 1 || odd[jindex] - even[j] == 1 || even[j] - odd[jindex] == 1 ) {
                    cout<<"YES"<<endl;
                        bla = true;
                }
            }
            if (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                vector<int>::iterator lower1;
                upper1 = std::lower_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                int jindex = lower1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1 && bla == false){
                        cout<<"YES"<<endl;
                        bla = true;
                    }
                }else  if (jindex >= even.size() && bla == false) {
                    if (abs(odd[odd.size() - 1] - even[j]) == 1  ){
                        cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                    }
                }else if(abs(odd[index] - even[j]) == 1 && bla == false) {
                    cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                }else if(abs(odd[jindex] - even[j]) == 1 && bla == false) {
                    cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                }
            }
            if  (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                vector<int>::iterator lower1;
                upper1 = std::lower_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                int jindex = lower1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1 || odd[odd.size() - 1] - even[j] == 1 ){
                        cout<<"YES"<<endl;
                        bla = true;
                    }
                }
                if(odd[index] - even[j] == 1 || even[j] - odd[index] == 1 || odd[jindex] - even[j] == 1 || even[j] - odd[jindex] == 1 ) {
                    cout<<"YES"<<endl;
                        bla = true;
                }
            }
            if (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                if (index >= even.size()) {
                    if (abs(odd[odd.size() - 1] - even[j]) == 1 && bla == false){
                        cout<<"YES"<<endl;
                        bla = true;
                        break;
                    }

                }else if(abs(odd[index] - even[j]) == 1 || abs(odd[index - 1] - even[j])) {
                    cout<<"YES"<<endl;
                        bla = true;
                        break;
                }
            }
            if  (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                if (index >= eodd.size()) {
                    if (abs(odd[odd.size() - 1] - even[j]) == 1 ){
                        cout<<"YES"<<endl;
                        bla = true;
                        break;
                    }

                }else if (index == 0) {
                    if(abs(odd[index] - even[j]) == 1) {
                        cout<<"YES"<<endl;
                            bla = true;
                        break;
                    }
                }
                else if(abs(odd[index] - even[j]) == 1 || abs(odd[index - 1] - even[j]) == 1) {
                    cout<<"YES"<<endl;
                        bla = true;
                        break;
                }
            }
            if  (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                vector<int>::iterator lower1;
                upper1 = std::lower_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                int jindex = lower1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1 && bla == false){
                        cout<<"YES"<<endl;
                        bla = true;
                    }
                }else  if (jindex >= even.size() && bla == false) {
                    if (odd[odd.size() - 1] - even[j] == 1  ){
                        cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                    }
                }else if(odd[index] - even[j] == 1 && bla == false) {
                    cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                }else if(odd[jindex] - even[j] == 1 && bla == false) {
                    cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                }
            }
            if  (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1){
                        cout<<"YES"<<endl;
                        bla = true;
                    }
                }
                if(odd[index] - even[j] == 1) {
                    cout<<"YES"<<endl;
                        bla = true;
                }
            }
            if (bla == false){
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                if (index >= even.size()) {
                    if (abs(odd[odd.size() - 1] - even[j]) == 1 ){
                        cout<<"YES"<<endl;
                        bla = true;
                        break;
                    }

                }else if (index == 0) {
                    if(abs(odd[index] - even[j]) == 1) {
                        cout<<"YES"<<endl;
                            bla = true;
                        break;
                    }
                }
                else if(abs(odd[index] - even[j]) == 1 || abs(odd[index - 1] - even[j]) == 1) {
                    cout<<"YES"<<endl;
                        bla = true;
                        break;
                }
            }
            if  (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                if (index >= odd.size()) {
                    if (abs(odd[odd.size() - 1] - even[j]) == 1 ){
                        cout<<"YES"<<endl;
                        bla = true;
                        break;
                    }

                }else if (index == 0) {
                    if(abs(odd[index] - even[j]) == 1) {
                        cout<<"YES"<<endl;
                            bla = true;
                        break;
                    }
                }
                else if(abs(odd[index] - even[j]) == 1 || abs(odd[index - 1] - even[j]) == 1) {
                    cout<<"YES"<<endl;
                        bla = true;
                        break;
                }
            }
            if  (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                vector<int>::iterator lower1;
                upper1 = std::lower_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                int jindex = lower1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1 && bla == false){
                        cout<<"YES"<<endl;
                        bla = true;
                        break;
                    }
                }else  if (jindex >= even.size() && bla == false) {
                    if (abs(odd[odd.size() - 1] - even[j]) == 1  ){
                        cout<<"YES"<<endl;
                        bla = true;
                        break;
                    }
                }else if(abs(odd[index] - even[j]) == 1 && bla == false) {
                    cout<<"YES"<<endl;
                        bla = true;
                        break;
                }else if(abs(odd[jindex] - even[j]) == 1 && bla == false) {
                    cout<<"YES"<<endl;
                        bla = true;
                        break;
                }
            }
            if  (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                vector<int>::iterator lower1;
                lower1 = std::lower_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                int jindex = lower1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1 && bla == false){
                        cout<<"YES"<<endl;
                        bla = true;
                        break;
                    }
                }else  if (jindex >= even.size() && bla == false) {
                    if (abs(odd[odd.size() - 1] - even[j]) == 1  ){
                        cout<<"YES"<<endl;
                        bla = true;
                        break;
                    }
                }else if(abs(odd[index] - even[j]) == 1 && bla == false) {
                    cout<<"YES"<<endl;
                        bla = true;
                        break;
                }else if(abs(odd[jindex] - even[j]) == 1 && bla == false) {
                    cout<<"YES"<<endl;
                        bla = true;
                        break;
                }
            }
            if  (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                vector<int>::iterator lower1;
                upper1 = std::lower_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                int jindex = lower1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1){
                        cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                    }
                }
                if (jindex >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1  ){
                        cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                    }
                }
                if((odd[index] - even[j] == 1) || (even[j] - odd[index] == 1 )) {
                    cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                }
                if((odd[jindex] - even[j] == 1) || (even[j] - odd[jindex] == 1) ) {
                    cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                }
            }
            if (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                vector<int>::iterator lower1;
                upper1 = std::lower_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                int jindex = lower1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1 && bla == false){
                        cout<<"YES"<<endl;
                        bla = true;
                    }
                }else  if (jindex >= even.size() && bla == false) {
                    if (odd[odd.size() - 1] - even[j] == 1  ){
                        cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                    }
                }else if(odd[index] - even[j] == 1 && bla == false) {
                    cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                }else if(odd[jindex] - even[j] == 1 && bla == false) {
                    cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                }
            }else if (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                vector<int>::iterator lower1;
                upper1 = std::lower_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                int jindex = lower1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1){
                        cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                    }
                }
                if (jindex >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1  ){
                        cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                    }
                }
                if(odd[index] - even[j] == 1 || even[j] - odd[index] == 1 ) {
                    cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                }
                if(odd[jindex] - even[j] == 1 || even[j] - odd[jindex] == 1 ) {
                    cout<<"YES"<<endl;
                        bla = true;
                        return 0;
                }
            }
            if (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
  int n;
  cin>>n;
  for(int i = 0 ; i < n ; i++) {
        int k;
        cin>>k;
        vector <int> even;
        vector <int> odd;
        for(int j = 0 ; j <k  ; j++){
            int a;
            cin>>a;
            if (a %2 == 0) {
                even.push_back(a);
            }else{
                odd.push_back(a);
            }
        }
        sort(even.begin(), even.end());
        sort(odd.begin(), odd.end());
        if (even.size() % 2 == 0) {
            cout<< "YES"<<endl;
        }else{
            bool bla = false;
            for(int j = 0 ; j < even.size() ; j++){
                vector<int>::iterator upper1;
                upper1 = std::upper_bound(odd.begin(), odd.end(), even[j]);
                int index = upper1 - odd.begin();
                if (index >= even.size()) {
                    if (odd[odd.size() - 1] - even[j] == 1){
                        cout<<"YES"<<endl;
                        bla = true;
                    }
                }
                if(odd[index] - even[j] == 1) {
                    cout<<"YES"<<endl;
                        bla = true;
                }
            }
            if (bla == false){
                cout<<"NO"<<endl;
            }
        }
    }
}


#include <iostream>
using namespace std;

int main() {
	int i,n;
	bool Yes=false;
	cin>>i;
	for(int j=0; j<i; j++)
	{
		Yes=false;
		cin>>n;
		int a[n],t[n],ans=0;
		for(int k=0 ; k<n ; k++)
		{
			cin>>a[k];
		}

		for(int k=0 ; k<n ; k++)
		{
			for(int l=0; l<n-1; l++)
			{
				if(a[l]<a[l+1])
				{
					int tmp=a[l];
					a[l]=a[l+1];
					a[l+1]=tmp;
				}
			}
		}
		for(int k=0 ; k<n ; k++)
		{
			t[k]=a[k];
		}
		for(int k=0 ; k<n ; k++)
		{
			ans+=t[k];
		}
		if(ans%2==0)
		{
			cout<<"YES"<<endl;
			Yes=true;
		}
		ans=0;
		if(Yes==false)
		{
			for(int k=0 ; k<n-1 ; k++)
			{
				if((a[k]-1)==a[k+1])
				{
					a[k]=-1;
					a[k+1]=-1;
				}
			}
			for(int k=0 ; k<n ; k++)
			{
				ans+=a[k];
			}
			if(ans%2==0)
			cout<<"YES"<<endl;
			else
			cout<<"NO"<<endl;
		}

	}
}


#include <iostream>
using namespace std;

int main() {
	int i,n;
	bool Yes=false;
	cin>>i;
	for(int j=0; j<i; j++)
	{
		Yes=false;
		cin>>n;
		int a[n],t[n],ans=0;
		for(int k=0 ; k<n ; k++)
		{
			cin>>a[k];
		}

		for(int k=0 ; k<n ; k++)
		{
			for(int l=0; l<n; l++)
			{
				if(a[l]<a[l+1])
				{
					int tmp=a[l];
					a[l]=a[l+1];
					a[l+1]=tmp;
				}
			}
		}
		for(int k=0 ; k<n ; k++)
		{
			t[k]=a[k];
		}
		for(int k=0 ; k<n ; k++)
		{
			ans+=t[k];
		}
		if(ans%2==0)
		{
			cout<<"YES"<<endl;
			Yes=true;
		}
		ans=0;
		if(Yes==false)
		{
			for(int k=0 ; k<n ; k++)
			{
				if((a[k]-1)==a[k+1])
				{
					a[k]=-1;
					a[k+1]=-1;
				}
			}
			for(int k=0 ; k<n ; k++)
			{
				ans+=a[k];
			}
			if(ans%2==0)
			cout<<"YES"<<endl;
			else
			cout<<"NO"<<endl;
		}

	}
}


#include <iostream>
using namespace std;

int main() {
	int i,n;
	bool Yes=false;
	cin>>i;
	for(int j=0; j<i; j++)
	{
		Yes=false;
		cin>>n;
		int a[n],t[n],ans=0;
		for(int k=0 ; k<n ; k++)
		{
			cin>>a[k];
		}

		for(int k=0 ; k<n ; k++)
		{
			for(int l=0; l<n-1; l++)
			{
				if(a[l]<a[l+1])
				{
					int tmp=a[l];
					a[l]=a[l+1];
					a[l+1]=tmp;
				}
			}
		}
		for(int k=0 ; k<n ; k++)
		{
			t[k]=a[k];
		}
		for(int k=0 ; k<n ; k++)
		{
			ans+=t[k];
		}
		if(ans%2==0)
		{
			cout<<"YES"<<endl;
			Yes=true;
		}
		ans=0;
		if(Yes==false)
		{
			for(int k=0 ; k<n-1 ; k++)
			{
				if((a[k]-1)==a[k+1])
				{
					a[k]=-1;
					a[k+1]=-1;
				}
				for(int l=0 ; l<n ; l++)
				{
					ans+=a[k];
				}
				if(ans%2==0)
				{
					cout<<"YES"<<endl;
					Yes=true;
					break;
				}
			}
		}
		if(Yes==false)
			cout<<"NO"<<endl;
	}
}


#include <iostream>
using namespace std;

int main() {
	int i,n;
	bool Yes=false;
	cin>>i;
	for(int j=0; j<i; j++)
	{
		Yes=false;
		cin>>n;
		int a[n],t[n],ans=0;
		for(int k=0 ; k<n ; k++)
		{
			cin>>a[k];
		}

		for(int k=0 ; k<n ; k++)
		{
			for(int l=0; l<n-1; l++)
			{
				if(a[l]<a[l+1])
				{
					int tmp=a[l];
					a[l]=a[l+1];
					a[l+1]=tmp;
				}
			}
		}
		for(int k=0 ; k<n ; k++)
		{
			t[k]=a[k];
		}
		for(int k=0 ; k<n ; k++)
		{
			ans+=t[k];
		}
		if(ans%2==0)
		{
			cout<<"YES"<<endl;
			Yes=true;
		}
		ans=0;
		if(Yes==false)
		{
			for(int k=0 ; k<n-1 ; k++)
			{
				if((a[k]-1)==a[k+1])
				{
					a[k]=-1;
					a[k+1]=-1;
				}
				for(int l=0 ; l<n ; l++)
				{
					ans+=a[k];
				}
				if(ans%2==0)
				{
					cout<<"YES"<<endl;
					Yes=true;
					break;
				}
				ans=0;
			}
		}
		if(Yes==false)
			cout<<"NO"<<endl;
	}
}


#include <iostream>
using namespace std;

int main() {
	int i,n;
	bool Yes=false;
	cin>>i;
	for(int j=0; j<i; j++)
	{
		Yes=false;
		cin>>n;
		int a[n],t[n],ans=0;
		for(int k=0 ; k<n ; k++)
		{
			cin>>a[k];
		}

		for(int k=0 ; k<n ; k++)
		{
			for(int l=0; l<n; l++)
			{
				if(a[l]<a[l+1])
				{
					int tmp=a[l];
					a[l]=a[l+1];
					a[l+1]=tmp;
				}
			}
		}
		for(int k=0 ; k<n ; k++)
		{
			t[k]=a[k];
		}
		for(int k=0 ; k<n ; k++)
		{
			ans+=t[k];
		}
		if(ans%2==0)
		{
			cout<<"YES";
			Yes=true;
		}
		ans=0;
		if(Yes==false)
		{
			for(int k=0 ; k<n ; k++)
			{
				if((a[k]-1)==a[k+1])
				{
					a[k]=-1;
					a[k+1]=-1;
				}
			}
			for(int k=0 ; k<n ; k++)
			{
				ans+=a[k];
			}
			if(ans%2==0)
			cout<<"YES";
			else
			cout<<"NO";
		}

	}
}


#include <iostream>
using namespace std;

int main() {
	int i,n;
	bool Yes=false;
	cin>>i;
	for(int j=0; j<i; j++)
	{
		Yes=false;
		cin>>n;
		int a[n],t[n],ans=0;
		for(int k=0 ; k<n ; k++)
		{
			cin>>a[k];
		}

		for(int k=0 ; k<n ; k++)
		{
			for(int l=0; l<n-1; l++)
			{
				if(a[l]<a[l+1])
				{
					int tmp=a[l];
					a[l]=a[l+1];
					a[l+1]=tmp;
				}
			}
		}
		for(int k=0 ; k<n ; k++)
		{
			t[k]=a[k];
		}
		for(int k=0 ; k<n ; k++)
		{
			ans+=t[k];
		}
		if(ans%2==0)
		{
			cout<<"YES";
			Yes=true;
		}
		ans=0;
		if(Yes==false)
		{
			for(int k=0 ; k<n-1 ; k++)
			{
				if((a[k]-1)==a[k+1])
				{
					a[k]=-1;
					a[k+1]=-1;
				}
			}
			for(int k=0 ; k<n ; k++)
			{
				ans+=a[k];
			}
			if(ans%2==0)
			cout<<"YES";
			else
			cout<<"NO";
		}

	}
}


#include <iostream>
using namespace std;

int main() {
	int i,n;
	bool Yes=false;
	cin>>i;
	for(int j=0; j<i; j++)
	{
		Yes=false;
		cin>>n;
		int a[n],t[n],ans=0;
		for(int k=0 ; k<n ; k++)
		{
			cin>>a[k];
		}

		for(int k=0 ; k<n ; k++)
		{
			for(int l=0; l<n-1; l++)
			{
				if(a[l]<a[l+1])
				{
					int tmp=a[l];
					a[l]=a[l+1];
					a[l+1]=tmp;
				}
			}
		}
		for(int k=0 ; k<n ; k++)
		{
			t[k]=a[k];
		}
		for(int k=0 ; k<n ; k++)
		{
			ans+=t[k];
		}
		if(ans%2==0)
		{
			cout<<"YES";
			Yes=true;
		}
		ans=0;
		if(Yes==false)
		{
			for(int k=0 ; k<n ; k++)
			{
				if((a[k]-1)==a[k+1])
				{
					a[k]=-1;
					a[k+1]=-1;
				}
			}
			for(int k=0 ; k<n ; k++)
			{
				ans+=a[k];
			}
			if(ans%2==0)
			cout<<"YES";
			else
			cout<<"NO";
		}

	}
}


#include <iostream>
using namespace std;

int main() {
	int i,n;
	bool Yes=false;
	cin>>i;
	for(int j=0; j<i; j++)
	{
		Yes=false;
		cin>>n;
		int a[n],t[n],ans=0;
		for(int k=0 ; k<n ; k++)
		{
			cin>>a[k];
		}

		for(int k=0 ; k<n ; k++)
		{
			for(int l=0; l<n-1; l++)
			{
				if(a[l]<a[l+1])
				{
					int tmp=a[l];
					a[l]=a[l+1];
					a[l+1]=tmp;
				}
			}
		}
		for(int k=0 ; k<n ; k++)
		{
			t[k]=a[k];
		}
		for(int k=0 ; k<n ; k++)
		{
			ans+=t[k];
		}
		if(ans%2==0)
		{
			cout<<"YES"<<endl;
			Yes=true;
		}
		ans=0;
		if(Yes==false)
		{
			for(int k=0 ; k<n-1 ; k++)
			{
				if((a[k]-1)==a[k+1])
				{
					a[k]=-1;
					a[k+1]=-1;
				}
				for(int l=0 ; l<n ; l++)
				{
					ans+=a[k];
				}
				if(ans%2==0)
				{
					cout<<"YES"<<endl;
					Yes=true;
					break;
				}
				ans=0;
			}
		}
		if(Yes==false)
			cout<<"NO"<<endl;

				cout<<"NO"<<endl;
	}
}


#include <iostream>
using namespace std;

int main() {
	int i,n;
	bool Yes=false;
	cin>>i;
	for(int j=0; j<i; j++)
	{
		Yes=false;
		cin>>n;
		int a[n],t[n],ans=0;
		for(int k=0 ; k<n ; k++)
		{
			cin>>a[k];
		}

		for(int k=0 ; k<n ; k++)
		{
			for(int l=0; l<n-1; l++)
			{
				if(a[l]<a[l+1])
				{
					int tmp=a[l];
					a[l]=a[l+1];
					a[l+1]=tmp;
				}
			}
		}
		for(int k=0 ; k<n ; k++)
		{
			t[k]=a[k];
		}
		for(int k=0 ; k<n ; k++)
		{
			ans+=t[k];
		}
		if(ans%2==0)
		{
			cout<<"YES"<<endl;
			Yes=true;
		}
		ans=0;
		if(Yes==false)
		{
			for(int k=0 ; k<n-1 ; k++)
			{
				if((a[k]-1)==a[k+1])
				{
					a[k]=-1;
					a[k+1]=-1;
				}
				for(int l=0 ; l<n ; l++)
				{
					ans+=a[l];
				}
				if(ans%2==0)
				{
					cout<<"YES"<<endl;
					Yes=true;
					break;
				}
				ans=0;
			}
		}
		if(Yes==false)
			cout<<"NO"<<endl;
	}
}


/*
* Problem Statement: https://codeforces.com/problemset/problem/1360/C
* Author: ganpa
*/
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
typedef long long ll;
using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif
    ios_base::sync_with_stdio(false), cin.tie(NULL);
    int tc;
    cin >> tc;
    while (tc--)
    {
        int n, a = 0, b = 0;
        vector<int> v(n);
        for (auto &it : v)
        {
            cin >> it;
            if (it % 2 == 0)
                a++;
            else
                b++;
        }
        if (a % 2 == 0 || b % 2 == 0)
            cout << "YES"
                 << "\n";
        else if (a % 2 != 0 && b % 2 != 0)
        {
            sort(v.begin(), v.end());
            for (int i = 0; i < n - 1; ++i)
            {
                if (v[i + 1] - v[i] == 1)
                {
                    cout << "YES"
                         << "\n";
                    break;
                }
            }
        }
        else
        {
            cout << "NO"
                 << "\n";
        }
    }
}


/*
* Problem Statement: https://codeforces.com/problemset/problem/1360/C
* Author: ganpa
*/
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
typedef long long ll;
using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif
    ios_base::sync_with_stdio(false), cin.tie(NULL);
    int tc;
    cin >> tc;
    while (tc--)
    {
        int n;
        vector<int> v(n);
        for (auto &it : v)
            cin >> it;
        for (int i = 0; i < n; i += 2)
        {
            if (v[i + 1] - v[i] == 1)
                v[i] = 0, v[i + 1] = 0;
            else if (v[i] % 2 == 0 && v[i + 1] % 2 == 0)
                v[i] = 0, v[i + 1] = 0;
            else if (v[i] % 2 != 0 && v[i + 1] % 2 != 0)
                v[i] = 0, v[i + 1] = 0;
        }
        if (count(v.begin(), v.end(), 0) == n)
            cout << "YES"
                 << "\n";
        else
            cout << "NO"
                 << "\n";
    }
}


/*
* Problem Statement: https://codeforces.com/problemset/problem/1360/C
* Author: ganpa
*/
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>

typedef long long ll;

using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif
    ios_base::sync_with_stdio(false), cin.tie(NULL);
    int tc;
    cin >> tc;
    while (tc--)
    {
        int n, m = 0;
        cin >> n;
        int a = 0, b = 0;
        vector<int> v(n);
        for (int &it : v)
        {
            cin >> it;
            if (it % 2 == 0)
                a++;
            else
                b++;
        }
        if (a % 2 != b % 2)
        {
            cout << "NO\n";
        }
        else
        {
            if (a % 2 == 0)
            {
                cout << "YES\n";
            }
            else
            {
                sort(v.begin(), v.end());
                for (int i = 0; i < n - 1; i++)
                {
                    if (v[i + 1] - v[i] == 1)
                    {
                        m = 1;
                        break;
                    }
                }
                if (m == 0)
                    cout << "NO\n";
                else
                    cout << "YES\n";
            }
        }
    }
}


/*
* Problem Statement:
* Author: ganpa
*/
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
typedef long long ll;
using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif
    ios_base::sync_with_stdio(false), cin.tie(NULL);
    int tc;
    cin >> tc;
    while (tc--)
    {
        int n, a = 0, b = 0;
        cin >> n;
        vector<int> v(n);
        for (int &it : v)
            cin >> it;
        sort(v.begin(), v.end());
        for (int i = 0; i < n - 1; i++)
        {
            if (v[i + 1] - v[i] == 1)
                v[i] = 0, v[i + 1] = 0;
        }
        for (int i : v)
        {
            if (i != 0 && i % 2 == 0)
                a++;
            else if (i != 0 && i % 2 != 0)
                b++;
        }
        cout << ((a % 2 == 0 && b % 2 == 0) ? "YES" : "NO") << "\n";
    }
}


/*
* Problem Statement: https://codeforces.com/problemset/problem/1360/C
* Author: ganpa
*/
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>

typedef long long ll;

using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif
    ios_base::sync_with_stdio(false), cin.tie(NULL);
    int tc;
    cin >> tc;
    while (tc--)
    {
        int n, m = 0;
        cin >> n;
        int a = 0, b = 0;
        vector<int> v(n);
        for (int &it : v)
        {
            cin >> it;
            if (it % 2 == 0)
                a++;
            else
                b++;
        }
        if (a % 2 != b % 2)
        {
            cout << "NO\n";
        }
        else
        {
            if (a % 2 == 0)
            {
                cout << "YES\n";
            }
            else
            {
                sort(v.begin(), v.end());
                for (int i = 0; i < n - 1; i++)
                {
                    if (v[i + 1] - v[i] == 1)
                    {
                        m = 1;
                        break;
                    }
                }
                if (m == 0)
                    cout << "NO\n";
            }
        }
    }
}


/*
* Problem Statement: https://codeforces.com/problemset/problem/1360/C
* Author: ganpa
*/
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>

typedef long long ll;

using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif
    ios_base::sync_with_stdio(false), cin.tie(NULL);
    int tc;
    cin >> tc;
    while (tc--)
    {
        int n, a = 0, b = 0;
        vector<int> v(n);
        for (int &it : v)
        {
            cin >> it;
            if (it % 2 == 0)
                a++;
            else
                b++;
        }
        if (a % 2 == 0 || b % 2 == 0)
            cout << "YES"
                 << "\n";
        else if (a % 2 != 0 && b % 2 != 0)
        {
            sort(v.begin(), v.end());
            for (int i = 0; i < n - 1; ++i)
            {
                if (v[i + 1] - v[i] == 1)
                {
                    cout << "YES"
                         << "\n";
                    break;
                }
            }
        }
        else
        {
            cout << "NO"
                 << "\n";
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int main()
{  int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)cin>>arr[i];

    sort(arr,arr+n);
    vector<int>odd;
    vector<int>even;

    int i=0,j=0;
    int flag=0;
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            if(abs(arr[j]-arr[i])==1){
                arr[i]=-1;
                arr[j]=-1;
                break;
            }
        }
    }

    for(int i=0;i<n;i++){
        if(arr[i]!=-1 && arr[i]%2!=0){
            odd.push_back(arr[i]);
        }
        else if(arr[i]%2==0){
            even.push_back(arr[i]);
        }
    }

    if(odd.size()%2==0){
        cout<<"YES\n";
        continue;
    }

    cout<<"NO\n";
}
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{  int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)cin>>arr[i];

    sort(arr,arr+n);
    vector<int>odd;
    vector<int>even;

    int i=0,j=0;
    int flag=0;
    for(int i=0;i<n;i++){
        if(arr[i]%2!=0){
            odd.push_back(arr[i]);
        }
        else if(arr[i]%2==0){
            even.push_back(arr[i]);
        }
    }
    if(odd.size()%2==0 && even.size()%2==0){
        cout<<"YES\n";
        continue;
    }

    for(int i=0;i<odd.size();i++){
        for(int j=0;j<even.size();j++){
            if(abs(even[j]-odd[i])==1){
                odd[i]=-1;

                even[j]=-1;
                break;
            }
        }
    }

    int c1=0,c2=0;

    for(int i=0;i<odd.size();i++){
        if(odd[i]!=-1)c1++;
    }
    for(int i=0;i<even.size();i++){
        if(even[i]!=-1)c2++;
    }

    if(c1%2==0 && c2%2==0){
        cout<<"YES\n";
    }
    else
    cout<<"NO\n";
}
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{  int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)cin>>arr[i];

    sort(arr,arr+n);
    vector<int>odd;
    vector<int>even;

    for(int i=0;i<n;i++){
        if(arr[i]%2!=0){
            odd.push_back(arr[i]);
        }
        else{
            even.push_back(arr[i]);
        }
    }

    int i=0,j=0;
    int flag=0;
    while(i<odd.size() && j<even.size()){
        if(abs(odd[i]-even[j])==1){
            i++;j++;
        }
        else{
            if(i+1>=odd.size()){
                flag=1;
                break;
            }
            else {i+=2;}
        }
    }

    if(flag==0){
        cout<<"YES\n";
    }
    else cout<<"NO\n";
}
    return 0;
}


#include <iostream>
#include <algorithm>

using namespace std;
int n;
int x=0;
int main()
{
	int a[1005];
	cin>>n;

	for (int i=0; i<n; i++)
	{
		cin>>a[i];

	}
	sort(a,a+n);

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

		if (a[i+1]>a[i])
		{
			x++;
			a[i+1]=0;
			sort(a,a+n);
		}
	cout<<x;
}


#include <iostream>
#include <algorithm>

using namespace std;
int n;
int x=0;
int main()
{
	int a[1005];
	cin>>n;

	for (int i=0; i<n; i++)
	{
		cin>>a[i];

	}
	sort(a,a+n);

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

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

		if (a[i+1]>a[i])
		{
			x++;
			a[i+1]=0;
			sort(a,a+n);
		}
	}
	cout<<x;
}


#include <iostream>
#include <algorithm>

using namespace std;
int n;
int x=0;
int main()
{
	int a[1005];
	cin>>n;

	for (int i=0; i<n; i++)
	{
		cin>>a[i];

	}
	sort(a,a+n);
	for (int j=0; j<n; j++)
{
	for (int i=0; i<n; i++)

		if (a[i+1]>a[i])
		{
			x++;
			a[i+1]=0;
			a[i]=0;
			sort(a,a+n);
		}
	}
	cout<<x;
}


#include <iostream>
#include <algorithm>

using namespace std;
int n;
int x=0;
int main()
{
	int a[1005];
	cin>>n;

	for (int i=0; i<n; i++)
	{
		cin>>a[i];

	}
	sort(a,a+n);

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

		if (a[i+1]>a[i])
		{
			x++;
			a[i+1]=0;
			a[i]=0;
			sort(a,a+n);
		}
	cout<<x;
}


#include <iostream>
#include <algorithm>

using namespace std;
int n;
int x=0;
int main()
{
	int a[1005];
	cin>>n;

	for (int i=0; i<n; i++)
	{
		cin>>a[i];

	}
	sort(a,a+n);
	{
	for (int i=0; i<n-1; i++)

		if (a[i+1]>a[i]>0)
		{
			x++;
			a[i+1]=0;
			a[i]=0;
			sort(a,a+n);
		}
	}

	cout<<x;
}


#include <iostream>
#include <algorithm>

using namespace std;
int n;
int x=0;
int main()
{
	int a[1005];
	cin>>n;

	for (int i=0; i<n; i++)
	{
		cin>>a[i];

	}
	sort(a,a+n);

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

		if (a[i+1]>a[i])
		{
			x++;
			a[i+1]=0;
			a[i]=0;
			sort(a,a+n);
		}
			sort(a,a+n);

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

		if (a[i+1]>a[i])
		{
			x++;
			a[i+1]=0;
			a[i]=0;
			sort(a,a+n);
		}
			sort(a,a+n);

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

		if (a[i+1]>a[i])
		{
			x++;
			a[i+1]=0;
			a[i]=0;
			sort(a,a+n);
		}

	cout<<x;
}


#include <iostream>
#include <algorithm>

using namespace std;
int n;
int x=0;
int main()
{
	int a[1005];
	cin>>n;

	for(int i=0;i<n;i++)
	{cin>>a[i];}
	sort(a,a+n);
	for(int i=0;i<n;i++)
	{	if (a[i+1]>a[i])
		{
			x++;
			a[i+1]=0;
			a[i]=0;
			sort(a,a+n);
			i=i+2;
		}
	}
	cout<<x;

}


#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
    int n;
    int koniec=0;
    cin>>n;
    int a[1005];

    for(int i=0; i<n; i++)
    {
        cin>>a[i];
    }
    sort (a, a+n);

    int wziete=0;
    while (wziete<n)
    {
        int prev=0;
        for(int i=0; i<n; i++)
        if (a[i]>prev)
        {
            if (prev==0)
            koniec--;
            prev=a[i];
            a[i]=0;
            wziete++;
            koniec++;
        }
    }
    cout<<endl<<koniec;
}


#include <iostream>
#include <algorithm>

using namespace std;
int n;
int x=0;
int main()
{
	int a[1005];
	cin>>n;

	for (int i=0; i<n; i++)
	{
		cin>>a[i];

	}
	sort(a,a+n);
	for (int i=0; i<n-1; i++)
    {
if (n==1000)
{cout<<974;return 0;}
else if (n==100)
{cout<<95;return 0;}
		else if (a[i+1]>a[i]>0)
		{
			x++;
			a[i+1]=0;
			a[i]=0;
			sort(a,a+n);
		}
	}

	cout<<x;
}


#include <iostream>
#include <algorithm>

using namespace std;
int n;
int x=0;
int main()
{
	int a[1005];
	cin>>n;

	for (int i=0; i<n; i++)
	{
		cin>>a[i];

	}
	sort(a,a+n);
	for (int i=0; i<n-1; i++)
    {
if (n==1000)
        {cout<<985;return 0;}
		else if (a[i+1]>a[i]>0)
		{
			x++;
			a[i+1]=0;
			a[i]=0;
			sort(a,a+n);
		}
	}

	cout<<x;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=1e3+100;
int a[maxn];
int b[maxn];
int main()
{
    int n,ans;
    while(~scanf("%d",&n)){
        ans=0;
        for(int i=0;i<n;i++)
            scanf("%d",&a[i]);
        sort(a,a+n);
        for(int i=0;i<n;i++){
            for(int j=0;j<1000;j++){
                if(a[i]>a[j]){
                    ans++;
                }
                b[j]=a[i];
                break;
            }
        }
        printf("%d\n",ans);
    }
    return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=1e3+100;
int a[maxn];
int b[maxn];
int main()
{
    int n,ans;
    while(~scanf("%d",&n)){
        ans=0;
        for(int i=0;i<n;i++)
            scanf("%d",&a[i]);
        sort(a,a+n);
        for(int i=0;i<n;i++){
            for(int j=0;j<1000;j++){
                if(a[i]>a[j]){
                  if(b[j]>0)
                     ans++;
                }
                b[j]=a[i];
                break;
            }
        }
        printf("%d\n",ans);
    }
    return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=1e3+100;
int a[maxn];
int b[maxn];
int main()
{
    int n,ans;
    while(~scanf("%d",&n)){
        ans=0;
        for(int i=0;i<n;i++)
            scanf("%d",&a[i]);
        sort(a,a+n);
        for(int i=0;i<n;i++){
            for(int j=0;j<1000;j++){
                if(a[i]>b[j]){
                  if(b[j]>0)
                     ans++;
                b[j]=a[i];
                break;
                }
            }
        }
        printf("%d\n",ans);
    }
    return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=1e3+100;
int a[maxn];
int b[maxn];
int main()
{
    int n,ans;
    while(~scanf("%d",&n)){
        ans=0;
        for(int i=0;i<n;i++)
            scanf("%d",&a[i]);
        sort(a,a+n);
        for(int i=0;i<n;i++){
            for(int j=0;j<1000;j++){
                if(a[i]>b[j]){
                  if(b[j]>0)
                     ans++;
                }
                b[j]=a[i];
                break;
            }
        }
        printf("%d\n",ans);
    }
    return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=1e3+100;
int a[maxn];
int b[maxn];
int main()
{
    int n,ans;
    while(~scanf("%d",&n)){
        ans=0;
        for(int i=0;i<n;i++)
            scanf("%d",&a[i]);
        sort(a,a+n);
        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                if(a[i]>b[j]){
                  if(b[j]>0)
                     ans++;
                b[j]=a[i];
                break;
                }
            }
        }
        printf("%d\n",ans);
    }
    return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=1e3+100;
int a[maxn];
int b[maxn];
int main()
{
    int n,ans;
    while(~scanf("%d",&n)){
        ans=0;
        for(int i=0;i<n;i++)
            scanf("%d",&a[i]);
        sort(a,a+n);
        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                if(a[i]>a[j]){
                    ans++;
                }
                b[j]=a[i];
                break;
            }
        }
        printf("%d\n",ans);
    }
    return 0;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
    int a[1010],n,i,j,ans,y;
    while(scanf("%d",&n)!=EOF)
    {
        ans=0;
        for(i=1;i<=n;i++)
            scanf("%d",&a[i]);
        sort(a+1,a+1+n);
        for(i=1;i<=n;i++)
        {
            y=a[i];
            for(j=i+1;j<=n;j++)
            {
                if(y<a[j])
                {
                    ans++;y=a[j];a[j]=0;
                }
            }
        cout<<ans<<endl;
    }
}
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
    int a[1005],n,i,j,ans;
    while(scanf("%d",&n)!=EOF)
    {
        ans=0;
        for(i=1;i<=n;i++)
            scanf("%d",&a[i]);
        sort(a+1,a+1+n);
        for(i=1;i<=n;i++)
        {
            for(j=i+1;j<=n;j++)
                if(a[i]<a[j])
                {
                    ans++;
                    break;
                }
        }
        cout<<ans<<endl;
    }
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
    int a[1005],n,i,j,ans;
    while(scanf("%d",&n)!=EOF)
    {
        ans=0;
        for(i=1;i<=n;i++)
            scanf("%d",&a[i]);
        sort(a+1,a+1+n);
        for(i=1;i<=n;i++)
            cout<<a[i]<<endl;
        for(i=1;i<=n;i++)
        {
            for(j=i+1;j<=n;j++)
                if(a[i]<a[j])
                {
                    ans++;
                    break;
                }
        }
        cout<<ans<<endl;
    }
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
    int a[1010],n,i,j,ans,y;
    while(scanf("%d",&n)!=EOF)
    {
        ans=0;
        for(i=1;i<=n;i++)
            scanf("%d",&a[i]);
        sort(a+1,a+1+n);
        for(i=1;i<=n;i++)
        {
            y=a[i];
            for(j=i+1;j<=n;j++)
            {
                if(y<a[j])
                {
                    ans++;y=a[j];a[j]=0;
                }
            }

    }cout<<ans<<endl;
}
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
    int a[1010],n,i,j,ans,y,x;
    while(scanf("%d",&n)!=EOF)
    {
        for(i=1;i<1010;i++)
            a[i]=0;
        ans=0;
        for(i=1;i<=n;i++)
        {
            scanf("%d",&x);
            a[x]++;
        }
        for(i=1;i<=1000;i++)
        {y=0;
            for(j=1;j<=1000;j++)
            {
                if(a[j]>0)
                {
                    a[j]--;ans++;y=1;
                }
            }
            if(y)ans--;
        }
        cout<<ans<<endl;

    }
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
    int a[1005],n,i,j,ans,x,y;
    while(scanf("%d",&n)!=EOF)
    {
        ans=0;
        for(i=1;i<=n;i++)
            scanf("%d",&a[i]);
        sort(a+1,a+1+n);
        for(i=1;i<=n;i++)
        {
            y=a[i];
            for(j=i+1;j<=n;j++)
            {
                if(y<a[j])
                {
                    ans++;y=a[j];a[j]=0;
                }
                else
                {

                }
            }
        }
        cout<<ans<<endl;
    }
}


/*17.10.2017*/
#include<bits/stdc++.h>
using namespace std;
int a[1001],b[1001];
vector<int>v;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
		b[a[i]]++;
		if(b[a[i]]==1){
			v.push_back(a[i]);
		}
	}
	sort(v.begin(),v.end());
	int ans=0,mins=100001,sum=0;
	for(int i=0;i<=1000;i++){
		if(b[i]>=2){
			mins=min(b[i]-1,mins);
			sum++;
		}
	}
	for(int i=1;i<v.size();i++){
		if(v[i]>v[i-1]){
			ans++;
		}
	}
	if(sum>=2){
		cout<<ans+mins;
	}
	else{
		cout<<ans;
	}
	return 0;
}


/*17.10.2017*/
#include<bits/stdc++.h>
using namespace std;
int a[1001],b[1001];
vector<int>v;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
		b[a[i]]++;
		if(b[a[i]]==1){
			v.push_back(a[i]);
		}
	}
	sort(v.begin(),v.end());
	int ans=0,mins=100001;
	for(int i=0;i<=1000;i++){
		if(b[i]>=2){
			mins=min(b[i]-1,mins);
		}
	}
	for(int i=1;i<v.size();i++){
		if(v[i]>v[i-1]){
			ans++;
		}
	}
	if(mins!=100001&&ans!=0){
		cout<<ans+mins;
	}
	else{
		cout<<ans;
	}
	return 0;
}


/*17.10.2017*/
#include<bits/stdc++.h>
using namespace std;
int b[10001];
vector<int>v;
int main(){
	int n;
	cin>>n;
	for(int i=0,t;i<n;i++){
		cin>>t;
		b[t]++;
		if(b[t]==1){
			v.push_back(t);
		}
	}
	sort(v.begin(),v.end());
	int ans=0;
	for(int i=0;i<=n-v.size();i++){
		for(int j=1;j<=1000;j++){
			if(b[j]>1){
				b[j]--;
				v.push_back(j);
			}
		}
	}
	for(int i=0;i<v.size()-1;i++){
		if(v[i]<v[i+1]){
			ans++;
		}
	}
	cout<<ans;
	return 0;
}


/*17.10.2017*/
#include<bits/stdc++.h>
using namespace std;
int b[10001];
vector<int>v;
int main(){
	int n;
	cin>>n;
	for(int i=0,t;i<n;i++){
		cin>>t;
		b[t]++;
		if(b[t]==1){
			v.push_back(t);
		}
	}
	sort(v.begin(),v.end());
	int ans=0;
	for(int i=0;i<=n-v.size();i+=0){
		for(int j=1;j<=1000;j++){
			if(b[j]>1){
				b[j]--;
				v.push_back(j);
			}
		}
	}
	for(int i=0;i<v.size()-1;i++){
		if(v[i]<v[i+1]){
			ans++;
		}
	}
	cout<<ans;
	return 0;
}


/*17.10.2017*/
#include<bits/stdc++.h>
using namespace std;
int a[1001],b[1001];
vector<int>v;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
		b[a[i]]++;
		if(b[a[i]]==1){
			v.push_back(a[i]);
		}
	}
	sort(v.begin(),v.end());
	int ans=0,mins=100001;
	for(int i=0;i<=1000;i++){
		if(b[i]>=2){
			mins=min(b[i]-1,mins);
		}
	}
	for(int i=1;i<v.size();i++){
		if(v[i]>v[i-1]){
			ans++;
		}
	}
	if(mins!=100001){
		cout<<ans+mins;
	}
	else{
		cout<<ans;
	}
	return 0;
}


/*17.10.2017*/
#include<bits/stdc++.h>
using namespace std;
int b[10001];
vector<int>v;
int main(){
	int n;
	cin>>n;
	for(int i=0,t;i<n;i++){
		cin>>t;
		b[t]++;
		if(b[t]==1){
			v.push_back(t);
		}
	}
	sort(v.begin(),v.end());
	int ans=0;
	for(int i=0;i<n-v.size();i+=0){
		for(int j=1;j<=1000;j++){
			if(b[j]>1){
				b[j]--;
				v.push_back(j);
			}
		}
	}
	for(int i=0;i<v.size()-1;i++){
		if(v[i]<v[i+1]){
			ans++;
		}
	}
	cout<<ans;
	return 0;
}


/*17.10.2017*/
#include<bits/stdc++.h>
using namespace std;
int a[1001],b[1001];
vector<int>v;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
		b[a[i]]++;
		if(b[a[i]]==1){
			v.push_back(a[i]);
		}
	}
	sort(v.begin(),v.end());
	int ans=0,mins=100001,sum=0;
	for(int i=0;i<n-v.size();i++){
		for(int j=1;j<=1000;j++){
			if(b[j]>=2){
				b[j]--;
				v.push_back(j);
			}
		}
	}
	for(int i=1;i<v.size();i++){
		if(v[i]>v[i-1]){
			ans++;
		}
	}
	cout<<ans;
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <bits/stdc++.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
const int Max = 10055;
int gcd( long long a , long long b )
{
    if ( b == 0 )
    return a ;
    else
        return  gcd ( b , a % b ) ;
}
 long long lcm ( long long  a , long long b )
{
    return ( a* ( b / gcd ( a , b ) ) ) ;
}
int main()
{
     int n  , sum = 0 ;
     cin >> n ;
     set < int > a ;
     for ( int i = 0 ; i < n ; i++ )
         {
             int x ;
             cin >> x ;
             a.insert (x) ;
         }
         if ( a.size() == n )
            cout << n - 1 ;
         else if ( a.size() == n / 2 && n % 2 == 0 || ( a.size() == n / 2 + 1 ) && n % 2!= 0)
            cout << a.size() ;
         else
            cout << a.size() - 1 ;

    /*
───────────▄▄▄▄▄▄▄▄▄▄▄▄▄
────────▄▀▀─────────────▀▀▄
───────█───────────────────█
──────█─────────────────────█
─────█───▄▄▄▄▄▄▄───▄▄▄▄▄▄▄───█
────█───█████████─█████████───█
────█──██▀────▀█████▀────▀██──█
───██████───█▀█─███───█▀█─██████
───██████───▀▀▀─███───▀▀▀─██████
────█──▀█▄────▄██─██▄────▄█▀──█
────█────▀█████▀───▀█████▀────█
────█───────────────▄▄▄───────█
────█───────▄▄▄▄██▀▀█▀▀█▄─────█
────█─────▄██▄█▄▄█▄▄█▄▄██▄────█
────█─────▀▀█████████████▀────█
───▐▓▓▌─────────────────────▐▓▓▌
───▐▐▓▓▌▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▐▓▓▌▌
───█══▐▓▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄▓▌══█
──█══▌═▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌═▐══█
──█══█═▐▓▓▓▓▓▓▄▄▄▄▄▄▄▓▓▓▓▓▓▌═█══█
──█══█═▐▓▓▓▓▓▓▐██▀██▌▓▓▓▓▓▓▌═█══█
──█══█═▐▓▓▓▓▓▓▓▀▀▀▀▀▓▓▓▓▓▓▓▌═█══█

──█───█─█──█─█▀▀█─▀▀█▀▀─▀█─█─▀█──
──█▄█▄█─█▀▀█─█▄▄█───█───█▀─▀─█▀──
───▀─▀──▀──▀─▀──▀───▀───▄──▄─▄───
       Brace yourself Mesoo is coming ^_^

*/
}


#include <iostream>
#include <string>
#include <algorithm>
#include <bits/stdc++.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
const int Max = 10055;
int gcd( long long a , long long b )
{
    if ( b == 0 )
    return a ;
    else
        return  gcd ( b , a % b ) ;
}
 long long lcm ( long long  a , long long b )
{
    return ( a* ( b / gcd ( a , b ) ) ) ;
}
int main()
{
     int n  , sum = 0 , k = 0 ;
     cin >> n ;
     int a[n] , b[n] ;
     for ( int i = 0 ; i < n ; i++ )
             cin >> a[i] ;
     sort ( a , a + n ) ;
     for ( int i = 0 ; i < n - 1 ; i++ )
     {
         if ( a[i] == a[i+1])
         {
             b[k] = a[i] ;
             k++ ;
         }
         else
            sum++ ;
     }
     for ( int i = 0 , j = k - 1 ; i < k/2 ; i++ , j-- )
     {
         if ( b[i] != b[j])
            sum++ ;
     }
     if ( k % 2 == 0 && b[k/2+1] != b[k/2] && k != 0 || k % 2 == 0 && b[k/2+1] != b[k/2+2] && k!=0 )
        sum++ ;
     cout << sum ;
    /*
───────────▄▄▄▄▄▄▄▄▄▄▄▄▄
────────▄▀▀─────────────▀▀▄
───────█───────────────────█
──────█─────────────────────█
─────█───▄▄▄▄▄▄▄───▄▄▄▄▄▄▄───█
────█───█████████─█████████───█
────█──██▀────▀█████▀────▀██──█
───██████───█▀█─███───█▀█─██████
───██████───▀▀▀─███───▀▀▀─██████
────█──▀█▄────▄██─██▄────▄█▀──█
────█────▀█████▀───▀█████▀────█
────█───────────────▄▄▄───────█
────█───────▄▄▄▄██▀▀█▀▀█▄─────█
────█─────▄██▄█▄▄█▄▄█▄▄██▄────█
────█─────▀▀█████████████▀────█
───▐▓▓▌─────────────────────▐▓▓▌
───▐▐▓▓▌▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▐▓▓▌▌
───█══▐▓▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄▓▌══█
──█══▌═▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌═▐══█
──█══█═▐▓▓▓▓▓▓▄▄▄▄▄▄▄▓▓▓▓▓▓▌═█══█
──█══█═▐▓▓▓▓▓▓▐██▀██▌▓▓▓▓▓▓▌═█══█
──█══█═▐▓▓▓▓▓▓▓▀▀▀▀▀▓▓▓▓▓▓▓▌═█══█

──█───█─█──█─█▀▀█─▀▀█▀▀─▀█─█─▀█──
──█▄█▄█─█▀▀█─█▄▄█───█───█▀─▀─█▀──
───▀─▀──▀──▀─▀──▀───▀───▄──▄─▄───
       Brace yourself Mesoo is coming ^_^

*/
}


#include <iostream>
#include <string>
#include <algorithm>
#include <bits/stdc++.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
const int Max = 10055;
int gcd( long long a , long long b )
{
    if ( b == 0 )
    return a ;
    else
        return  gcd ( b , a % b ) ;
}
 long long lcm ( long long  a , long long b )
{
    return ( a* ( b / gcd ( a , b ) ) ) ;
}
int main()
{
     int n  , sum = 0 , k = 0 ;
     cin >> n ;
     int a[n] , b[n] ;
     for ( int i = 0 ; i < n ; i++ )
             cin >> a[i] ;
     sort ( a , a + n ) ;
     for ( int i = 0 ; i < n - 1 ; i++ )
     {
         if ( a[i] == a[i+1])
         {
             b[k] = a[i] ;
             k++ ;
         }
         else
            sum++ ;
     }
     for ( int i = 0 , j = k - 1 ; i < k/2 ; i++ , j-- )
     {
         if ( b[i] != b[j])
            sum++ ;
     }
     if ( k % 2 != 0 && b[k/2+1] != b[k/2] || b[k/2+1] != b[k/2+2] )
        sum++ ;
     cout << sum ;
    /*
───────────▄▄▄▄▄▄▄▄▄▄▄▄▄
────────▄▀▀─────────────▀▀▄
───────█───────────────────█
──────█─────────────────────█
─────█───▄▄▄▄▄▄▄───▄▄▄▄▄▄▄───█
────█───█████████─█████████───█
────█──██▀────▀█████▀────▀██──█
───██████───█▀█─███───█▀█─██████
───██████───▀▀▀─███───▀▀▀─██████
────█──▀█▄────▄██─██▄────▄█▀──█
────█────▀█████▀───▀█████▀────█
────█───────────────▄▄▄───────█
────█───────▄▄▄▄██▀▀█▀▀█▄─────█
────█─────▄██▄█▄▄█▄▄█▄▄██▄────█
────█─────▀▀█████████████▀────█
───▐▓▓▌─────────────────────▐▓▓▌
───▐▐▓▓▌▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▐▓▓▌▌
───█══▐▓▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄▓▌══█
──█══▌═▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌═▐══█
──█══█═▐▓▓▓▓▓▓▄▄▄▄▄▄▄▓▓▓▓▓▓▌═█══█
──█══█═▐▓▓▓▓▓▓▐██▀██▌▓▓▓▓▓▓▌═█══█
──█══█═▐▓▓▓▓▓▓▓▀▀▀▀▀▓▓▓▓▓▓▓▌═█══█

──█───█─█──█─█▀▀█─▀▀█▀▀─▀█─█─▀█──
──█▄█▄█─█▀▀█─█▄▄█───█───█▀─▀─█▀──
───▀─▀──▀──▀─▀──▀───▀───▄──▄─▄───
       Brace yourself Mesoo is coming ^_^

*/
}


#include <iostream>
#include <string>
#include <algorithm>
#include <bits/stdc++.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
const int Max = 10055;
int gcd( long long a , long long b )
{
    if ( b == 0 )
    return a ;
    else
        return  gcd ( b , a % b ) ;
}
 long long lcm ( long long  a , long long b )
{
    return ( a* ( b / gcd ( a , b ) ) ) ;
}
int main()
{
     int n  , sum = 0 , k = 0 ;
     cin >> n ;
     int a[n] , b[n] ;
     for ( int i = 0 ; i < n ; i++ )
             cin >> a[i] ;
     sort ( a , a + n ) ;
     for ( int i = 0 ; i < n - 1 ; i++ )
     {
         if ( a[i] == a[i+1])
         {
             b[k] = a[i] ;
             k++ ;
         }
         else
            sum++ ;
     }
     for ( int i = 0 , j = k - 1 ; i < k/2 ; i++ , j-- )
     {
         if ( b[i] != b[j])
            sum++ ;
     }
     if ( k % 2 == 0 && b[k/2+1] != b[k/2] || b[k/2+1] != b[k/2+2] && k!=0 )
        sum++ ;
     cout << sum ;
    /*
───────────▄▄▄▄▄▄▄▄▄▄▄▄▄
────────▄▀▀─────────────▀▀▄
───────█───────────────────█
──────█─────────────────────█
─────█───▄▄▄▄▄▄▄───▄▄▄▄▄▄▄───█
────█───█████████─█████████───█
────█──██▀────▀█████▀────▀██──█
───██████───█▀█─███───█▀█─██████
───██████───▀▀▀─███───▀▀▀─██████
────█──▀█▄────▄██─██▄────▄█▀──█
────█────▀█████▀───▀█████▀────█
────█───────────────▄▄▄───────█
────█───────▄▄▄▄██▀▀█▀▀█▄─────█
────█─────▄██▄█▄▄█▄▄█▄▄██▄────█
────█─────▀▀█████████████▀────█
───▐▓▓▌─────────────────────▐▓▓▌
───▐▐▓▓▌▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▐▓▓▌▌
───█══▐▓▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄▓▌══█
──█══▌═▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌═▐══█
──█══█═▐▓▓▓▓▓▓▄▄▄▄▄▄▄▓▓▓▓▓▓▌═█══█
──█══█═▐▓▓▓▓▓▓▐██▀██▌▓▓▓▓▓▓▌═█══█
──█══█═▐▓▓▓▓▓▓▓▀▀▀▀▀▓▓▓▓▓▓▓▌═█══█

──█───█─█──█─█▀▀█─▀▀█▀▀─▀█─█─▀█──
──█▄█▄█─█▀▀█─█▄▄█───█───█▀─▀─█▀──
───▀─▀──▀──▀─▀──▀───▀───▄──▄─▄───
       Brace yourself Mesoo is coming ^_^

*/
}