/**
 * @author : Kshitij
 */
import java.io.*;
import java.util.InputMismatchException;

public class Main {
    public static void main(String[] xps){
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
        StringBuilder stringBuilder = new StringBuilder();
        int t=in.readInt();
        while (t-->0){
            int n=in.readInt();
            int[] array=new int[n];
            for (int i = 0; i <n ; i++) {
                array[i]=in.readInt();
            }
            stringBuilder.append(solver(array)).append("\n");
        }
        out.println(stringBuilder);
    }
    public static String solver(int[] array){
        long sum=0;
        for (int a :
                array) {
            sum+=a;
        }
        if (sum%2==0)
            return "NO";
        else
            return "YES";
    }
    private static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public double readDouble() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E') {
                    return res * Math.pow(10, readInt());
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E') {
                        return res * Math.pow(10, readInt());
                    }
                    if (c < '0' || c > '9') {
                        throw new InputMismatchException();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    private static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
            writer.flush();
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
            writer.flush();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }
    }
}


import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int testCase = scan.nextInt();

        for(int i = 0; i < testCase; i++){
            int odd = 0;
            int even = 0;

            int num = scan.nextInt();
            for(int j = 0; j < num; j++){
                int input = scan.nextInt();
                if(input % 2 == 0)
                    even++;
                else
                    odd++;
            }
            if(num % 2 == 1){
                if(odd > 0)
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
            else{
                if(odd > 0 && even> 0)
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
        }
    }
}


import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int testCase = scan.nextInt();

        for(int j = 0; j < testCase; j++){
            int elementNum = scan.nextInt();
            int sum = 0;
            for(int i = 0; i < elementNum; i++){
                sum += (scan.nextInt() % 2);
            }

            System.out.println(((sum % 2 == 1) && (elementNum != 0)) ? "YES" : "NO");
        }
    }
}


import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int testCase = scan.nextInt();

        for(int j = 0; j < testCase; j++){
            int elementNum = scan.nextInt();
            int sum = 0;
            for(int i = 0; i < elementNum; i++){
                sum += (scan.nextInt() % 2);
            }

            System.out.println(sum % 2 == 1 ? "YES" : "NO");
        }
    }
}


import java.util.Scanner;

public class Array_Odd_Sum {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int test = in.nextInt();
        for (int i = 0; i < test; i++) {
            int sum = 0;
            int se;
            int oh = 0, eh = 0;
            int size = in.nextInt();
            if (size % 2 == 0) {
                se = 1;
            } else {
                se = 0;
            }

            int arr[] = new int[size];
            for (int i1 = 0; i1 < size; i1++) {
                arr[i1] = in.nextInt();
                if (arr[i1] % 2 == 0) {
                    eh = 1;
                } else {
                    oh = 1;
                }
            }
            for (int i1 = 0; i1 < size; i1++) {
                sum = sum + arr[i1];
            }
            if (sum % 2 != 0) {
                System.out.println("YES");
                continue;
            } else {
                if (se == 0) {
                    if (eh == 1 && oh == 1) {
                        System.out.println("YES");
                        continue;
                    }
                } else {
                    if (eh == 1 && oh == 1) {
                        System.out.println("YES");
                        continue;

                    }

                }

            }
        }
    }
}


import java.util.Scanner;

public class Array_Odd_Sum {
    public static void main(String[] args) {
        Scanner in =new Scanner (System.in);
        int test=in.nextInt();
        for(int i=0;i<test;i++){
            int size=0,sum=0;
            size=in.nextInt();
            int arr[]=new int[size];
            for(int i1=0;i<size;i1++){
                arr[i1]=in.nextInt();
                sum=sum+arr[i1];
            }
            if(sum%2==0){
                System.out.println("NO");
            }
            else{
                System.out.println("YES");
            }

        }

    }
}


import java.util.Scanner;

public class Array_Odd_Sum {
    public static void main(String[] args) {
        Scanner in =new Scanner (System.in);
        int test=in.nextInt();
        for(int i=0;i<test;i++){
            int sum=0;
            int size=in.nextInt();
            int arr[]=new int[size];
            for(int i1=0;i1<size;i1++){
                arr[i1]=in.nextInt();
            }
            for(int i1=0;i1<size;i1++){
                sum=sum+arr[i1];
            }
            if(sum%2==0){
                System.out.println("NO");
            }
            else{
                System.out.println("YES");
            }
        }
    }
}


import java.util.Scanner;

public class Array_Odd_Sum {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int test = in.nextInt();
        for (int i = 0; i < test; i++) {
            int size = in.nextInt();
            int sum = 0;
            int se = 0;
            int oh = 0, eh = 0;
            if (size % 2 == 0) {
                se = 1;
            }
            int arr[] = new int[size];
            for (int i1 = 0; i1 < size; i1++) {
                arr[i1] = in.nextInt();

                if (arr[i1] % 2 == 0) {
                    eh = 1;
                } else {
                    oh = 1;
                }
            }
            for (int i1 = 0; i1 < size; i1++) {
                sum = sum + arr[i1];
            }

            if (sum % 2 != 0) {
                System.out.println("YES");
                continue;
            }
            if (se == 0) {
                if (eh == 1 && oh == 1) {
                    System.out.println("YES");
                    continue;
                } else {
                    System.out.println("NO");
                }
            } else {
                if (eh == 1 && oh == 1) {
                    System.out.println("YES");
                    continue;
                } else {
                    System.out.println("NO");
                }

            }
        }
    }
}


import java.util.Scanner;

public class Array_Odd_Sum {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int test = in.nextInt();
        for (int i = 0; i < test; i++) {
            int sum = 0;
            int se;
            int oh = 0, eh = 0;
            int size = in.nextInt();
            if (size % 2 == 0) {
                se = 1;
            } else {
                se = 0;
            }

            int arr[] = new int[size];
            for (int i1 = 0; i1 < size; i1++) {
                arr[i1] = in.nextInt();
                if (arr[i1] % 2 == 0) {
                    eh = 1;
                } else {
                    oh = 1;
                }
            }
            for (int i1 = 0; i1 < size; i1++) {
                sum = sum + arr[i1];
            }
            if (sum % 2 != 0) {
                System.out.println("YES");
                continue;
            } else {
                if (se == 0) {
                    if (eh == 1 && oh == 1) {
                        System.out.println("YES");
                        continue;
                    } else {
                        if (eh == 1 && oh == 1) {
                            System.out.println("YES");
                            continue;

                        }

                    }

                }
            }
        }
    }
}


import java.util.Scanner;

public class Array_Odd_Sum {
    public static void main(String[] args) {
        Scanner in =new Scanner (System.in);
        int test=in.nextInt();
        for(int i=0;i<test;i++){
            int sum=0;
            int size=in.nextInt();
            int arr[]=new int[size];
            for(int i1=0;i1<size;i1++){
                arr[i1]=in.nextInt();
            }
            for(int i1=0;i1<size;i1++){
                sum=sum+arr[i1];
            }
            if(sum%2==0){
                System.out.println("NO");
            }
            else{
                System.out.println("YES");
            }
            System.out.println();
        }
    }
}


import java.util.Scanner;

public class Array_Odd_Sum {
    public static void main(String[] args) {
        Scanner in =new Scanner (System.in);
        int test=in.nextInt();
        for(int i=0;i<test;i++){
            int sum=0;
            int se;
            int oh=0,eh=0;
            int size=in.nextInt();
            if(size%2==0){
              se=1;
            }
            else{
                se=0;
            }

            int arr[]=new int[size];
            for(int i1=0;i1<size;i1++){
                arr[i1]=in.nextInt();
                if(arr[i1]%2==0){
                    eh=1;
                }
                else{
                    oh=1;
                }
            }
            for(int i1=0;i1<size;i1++){
                sum=sum+arr[i1];
            }
            if(sum%2!=0){
                System.out.println("YES");
                continue;
            }
            else{
                if(se==0){
                    if(eh==1&&oh==1){
                        System.out.println("YES");
                        continue;
                    }
                }
                else {
                    if(eh==1&&oh==1){
                        System.out.println("YES");
                        continue;

                }

            }

        }
    }
}


import java.util.Scanner;

public class Array_Odd_Sum {
    public static void main(String[] args) {
        Scanner in =new Scanner (System.in);
        int test=in.nextInt();
        for(int i=0;i<test;i++){
            int sum=0;
            int se;
            int oh=0,eh=0;
            int size=in.nextInt();
            if(size%2==0){
              se=1;
            }
            else{
                se=0;
            }

            int arr[]=new int[size];
            for(int i1=0;i1<size;i1++){
                arr[i1]=in.nextInt();
                if(arr[i1]%2==0){
                    eh=1;
                }
                else{
                    oh=1;
                }
            }
            for(int i1=0;i1<size;i1++){
                sum=sum+arr[i1];

            }
            if(sum%2!=0){
                System.out.println("YES");
                continue;
            }
            else{
                if(se==0){
                    if(eh==1&&oh==1){
                        System.out.println("YES");
                        continue;
                    }
                }
                else {
                    System.out.println("NO");
                    continue;
                }

            }

        }
    }
}


import java.util.Scanner;
import java.util.Arrays;
import java.lang.*;
import java.io.*;
import java.util.*;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.*;
import java.util.function.Function;

public class ArrayWithOddSum {
	public static void main(String[] args)throws IOException {
		Scanner sc = new Scanner(System.in);

		int t = sc.nextInt();
		for(int i=0;i<t;i++){
		    int n = sc.nextInt();
		    int a[] = new int[n];
		    for(int j=0;j<n;j++){
		        a[j] = sc.nextInt();
		    }
		    System.out.println(check(a));
		}
		sc.close();

	}
	static String check(int[] a){
	    int sum  =0;
	    for(int i=0;i<a.length;i++){
	        sum += a[i];
	    }

	    if( Arrays.stream(a).map(x -> x % 2).distinct().count() == 2 || sum % 2 !=0){
	        return "YES";
	    }else{
	        return "NO";
	    }

	}
}


import java.util.Scanner;
import java.util.Arrays;
import java.lang.*;
import java.io.*;
import java.util.*;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.*;
import java.util.function.Function;

public class ArrayWithOddSum {
	public static void main(String[] args)throws IOException {
		Scanner sc = new Scanner(System.in);

		int t = sc.nextInt();
		for(int i=0;i<t;i++){
		    int n = sc.nextInt();
		    int a[] = new int[n];
		    for(int j=0;j<n;j++){
		        a[j] = sc.nextInt();
		    }
		    System.out.println(check(a));
		}
		sc.close();

	}
	static String check(int[] a){
	    int sum  =0;
	    for(int i=0;i<a.length;i++){
	        sum += a[i];
	    }
	    if(sum % 2 !=0){
	        return "YES";
	    }else{
	        return "NO";
	    }

	}
}


import java.util.Scanner;

/**
 *
 * @author Tonmoy
 */
public class Array_with_Odd_Sum_1296A {
    public static void main(String[] args) {
        Scanner In=new Scanner(System.in);
        int t=In.nextInt();
        for (int i = 0; i < t; i++) {
            int n=In.nextInt();
            int sum=0;
            int num;
            int even=0;
            int odd=0;
            for (int j = 0; j < n; j++) {
                num=In.nextInt();
                 sum=sum+num;
                 if(num%2==0){
                     even++;
                 }
                 else{
                     odd++;
                 }
                 if(sum%2!=0){
                     System.out.println("YES");
                 }
                 else{
                     if(odd!=0 && even!=0){
                         System.out.println("YES");
                     }
                     else{
                         System.out.println("NO");
                     }
                 }
            }

        }
    }
}


import java.util.Scanner;

/**
 *
 * @author Tonmoy
 */
public class Array_with_Odd_Sum_1296A {
    public static void main(String[] args) {
        Scanner In=new Scanner(System.in);
        int t=In.nextInt();
        for (int i = 0; i < t; i++) {
            int n=In.nextInt();
            int sum=0;
            int num;
            int even=0;
            int odd=0;
            for (int j = 0; j < n; j++) {
                num=In.nextInt();
                 sum=sum+num;
                 if(num%2==0){
                     even++;
                 }
                 else{
                     odd++;
                 }
            }
                 if(sum%2!=0){
                     System.out.println("YES");
                 }
                 else{
                     if(odd!=0 && even!=0){
                         System.out.println("YES");
                     }
                     else{
                         System.out.println("NO");
                     }
                 }
            }

        }
    }


import java.util.Scanner;

/**
 *
 * @author Tonmoy
 */
public class Array_with_Odd_Sum_1296A {
    public static void main(String[] args) {
        Scanner In=new Scanner(System.in);
        int t=In.nextInt();
        for (int i = 0; i < t; i++) {
            int n=In.nextInt();
            int sum=0;
            int num;
            for (int j = 0; j < n; j++) {
                num=In.nextInt();
                sum=sum+num;
            }
            if(sum%2==0){
                System.out.println("NO");
            }
            else{
                System.out.println("YES");
            }
        }
    }
}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
    static int a =0;
    static int b =0;
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner input = new Scanner(System.in);
		int test= input.nextInt();
		while(test-->0){
		   int n = input.nextInt();
		   int sum =0;
		   int count[] = new int[2];
		   for(int i =0;i<n;i++){
		       int a = input.nextInt();
		       sum+=a;
		       count[a%2]++;
		   }
		   if(sum%2 == 1){
		       System.out.println("YES");
		   }else{

		       if(count[1]>0 && count[0]>0 && count[1]%2 == 0 && count[0]%2 == 0)System.out.println("YES");
		  else if(count[1]>0 && count[0]>0 && count[1]%2 == 1 && count[0]%2 == 1)System.out.println("YES");
		       else System.out.println("NO");

		   }

		}

	}
}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
    static int a =0;
    static int b =0;
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner input = new Scanner(System.in);
		int test= input.nextInt();
		while(test-->0){
		   int n = input.nextInt();
		   int sum =0;
		   int count[] = new int[2];
		   for(int i =0;i<n;i++){
		       int a = input.nextInt();
		       sum+=a;
		       count[a%2]++;
		   }

		   if(sum%2 == 1){
		       System.out.println("YES");
		   }else{
		       if(count[1] == 0)System.out.println("NO");
		       else if(count[0] == 0 && count[1]%2 == 0)System.out.println("NO");
		       else System.out.println("YES");

		   }

		}

	}
}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
    static int a =0;
    static int b =0;
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner input = new Scanner(System.in);
		int test= input.nextInt();
		while(test-->0){
		   int n = input.nextInt();
		   int sum =0;
		   int count[] = new int[2];
		   for(int i =0;i<n;i++){
		       int a = input.nextInt();
		       sum+=a;
		       count[a%2]++;
		   }
		   if(sum%2 == 1){
		       System.out.println("YES");
		   }else{

		       if(count[1]>0 && count[0]>0 && count[1]%2 == 0 && count[0]%2 == 0)System.out.println("YES");
		       else System.out.println("NO");

		   }

		}

	}
}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
    static int a =0;
    static int b =0;
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner input = new Scanner(System.in);
		int test= input.nextInt();
		while(test-->0){
		   int n = input.nextInt();
		   int sum =0;
		   int count[] = new int[2];
		   for(int i =0;i<n;i++){
		       int a = input.nextInt();
		       sum+=a;
		       count[a%2]++;
		   }

		   if(sum%2 == 1){
		       System.out.println("YES");
		   }else{
		       if(count[1]>0 && count[0]>0 && count[1]%2 == 0 && count[0]%2 == 1)System.out.println("YES");
		       else if(count[1]>0 && count[0]>0 && count[1]%2 == 0 && count[0]%2 == 0)System.out.println("YES");
		       else if(count[1]>0 && count[0]>0 && count[1]%2 == 1 && count[0]%2 == 1)System.out.println("YES");
		       else System.out.println("NO");

		   }

		}

	}
}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
    static int a =0;
    static int b =0;
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner input = new Scanner(System.in);
		int test= input.nextInt();
		while(test-->0){
		   int n = input.nextInt();
		   int sum =0;
		   for(int i =0;i<n;i++){
		       int a = input.nextInt();
		       sum+=a;
		   }
		   if(sum%2 == 0)System.out.println("NO");
		   else System.out.println("YES");

		}

	}
}


import java.util.Scanner;

public class codeforcesa2 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn = new Scanner (System.in);

		int hm = scn.nextInt();
		int sum = 0;
		int n, k, j;
		String[] result = new String[hm];

		for(k = hm; k>0; k--) {
			int num = scn.nextInt();
			for(j = num; j>0; j--) {
				int i = scn.nextInt();
				sum += i;
				n = Math.abs(k-hm);

				if(sum % 2 != 0) {

					result[Math.abs(n)] = "YES";
				}
				else
					result[Math.abs(n)] ="NO";
			}
			sum = 0;
		}

		for(int s = 0; s<result.length; s++)
			System.out.println(result[s]);
	}

}


import java.util.Scanner;

public class codeforcesa2 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn = new Scanner (System.in);

		int hm = scn.nextInt();
		int sum = 0;
		int sum2= 0;
		int n, k, j, num;
		int [] arr;
		int [] ex;
		String[] result = new String[hm];
		double rv = Math.random();
		int val1, val2;

		for(k = hm; k>0; k--) {
			num = scn.nextInt();
			n = Math.abs(k-hm);
			arr = new int[num];
			ex = new int[num];
			for(j = num; j>0; j--) {
				int i = scn.nextInt();
				arr[Math.abs(j-num)] = i;
				ex[Math.abs(j-num)] = i;
				sum += i;
				if(sum % 2 != 0) {

					result[Math.abs(n)] = "YES";
				}
				else if(sum%2 == 0) {
					val1 = (int)(rv*num)+1;
					val2 = (int)(rv*num)+1;
					ex[val1] = ex[val2];
					for(int q = 0; q<num; q++) {
						sum2 += ex[q];
					}
					if(sum2 % 2 != 0) {
						result[Math.abs(n)] = "YES";
					}
					else
						result[Math.abs(n)] ="NO";
					sum2 = 0;
				}

			}
			sum = 0;
		}

		for(int s = 0; s<result.length; s++)
			System.out.println(result[s]);
	}

}


import java.util.Scanner;

public class codeforcesa3 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int hm = scan.nextInt();
		int num, n;
		boolean odd = false;
		boolean even = false;

		for (int i = 0; i < hm; i++) {
			num = scan.nextInt();
			n = 0;

			for (int j = 0; j < num; j++) {
				n = scan.nextInt();
				if (n % 2 != 0) {
					odd = true;
				} else {
					even = true;
				}
			}
			if (num % 2 == 0) {
				if (odd == true && even == true) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if (odd == true) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		}

		scan.close();

	}
}


import java.util.Scanner;

public class qqq {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int testcase = scan.nextInt();
		int num;

		for (int i = 0; i < testcase; i++) {
			num = scan.nextInt();
			int n = 0;
			boolean odd = false;
			boolean even = false;

			for (int j = 0; j < num; j++) {
				n = scan.nextInt();
				if (n % 2 != 0) {
					odd = true;
				} else {
					even = true;
				}
			}
			if (num % 2 == 0) {
				if (odd == true && even == true) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if (odd == true) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		}

		scan.close();
	}
}


import java.util.Scanner;

public class qqq {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int testcase = scan.nextInt();
		int num;

		for (int i = 0; i < testcase; i++) {
			num = scan.nextInt();
			int n = 0;
			boolean odd = false;
			boolean even = false;

			for (int j = 0; j < num; j++) {
				n = scan.nextInt();
				if (n % 2 != 0) {
					odd = true;
				} else {
					even = true;
				}
			}
			if (num % 2 == 0) {
				if (odd == true && even == true) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if (odd == true) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		}

		scan.close();
	}


import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
public class code_main{
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		int t=in.nextInt();
		while(t--!=0){
			int n=in.nextInt();
			int o=0,e=0,sum=0;
			for(int i=0;i<n;i++){
				int x=in.nextInt();
				if(x%2==0){
					e+=1;
				}
				else
					o+=1;
				sum+=x;
			}
			if(sum%2==1 && e>=1 && o>=1){
				System.out.println("Yes");
			}
			else{
				System.out.println("No");
			}
		}
	}
}


import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
public class code_main{
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		int t=in.nextInt();
		while(t--!=0){
			int n=in.nextInt();
			int o=0,e=0,sum=0;
			for(int i=0;i<n;i++){
				int x=in.nextInt();
				if(x%2==0){
					e+=1;
				}
				else
					o+=1;
				sum+=x;
			}
			if(sum%2!=0 || (e>=1 && o>=1)){
				System.out.println("Yes");
			}
			else{
				System.out.println("No");
			}
		}
	}
}


import java.util.*;
import java.lang.*;
public class feb04_01{
    public static void main(String args[])
    {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        while(t--!=0){
            int n,sum=0;
            n=sc.nextInt();
            int a[]=new int[n];
            for(int i=0;i<n;i++)
            {
            a[i]=sc.nextInt();
            }
            for(int i=0;i<n;i++)
            {
            sum=sum+a[i];
            }
            if(sum%2==0)
            {
            System.out.println("NO");
            }
            else{
            System.out.println("YES");
            }
        }
    }
}


import java.io.*;
import java.util.*;

public class A {
	static FastReader sc=new FastReader();

	public static void main(String[] args) {
		int t=sc.nextInt();

		while(t-->0) {
			int n=sc.nextInt();
			int a[]=readArray(n);
			int c=0;
			for(int e:a) {
				if(e%2==1) c++;
			}
			if(c%2==1) {
				System.out.println("YES");
			}
			else {
				System.out.println("NO");
			}

		}
	}
	static int[] readArray(int n) {
		int a[]=new int [n];
		for(int i=0;i<n;i++) {
			a[i]=sc.nextInt();
		}
		return a;
	}
	static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


import java.io.*;
import java.util.*;

public class A {
	static FastReader sc=new FastReader();

	public static void main(String[] args) {
		int t=sc.nextInt();

		while(t-->0) {
			int n=sc.nextInt();
			int a[]=readArray(n);
			int c=0;
			for(int e:a) {
				if(e%2==1) c++;
			}
			if(c%2==1 || (c%2==0 && c!=n && c!=0)) {
				System.out.println("YES");
			}
			else {
				System.out.println("NO");
			}

		}
	}
	static int[] readArray(int n) {
		int a[]=new int [n];
		for(int i=0;i<n;i++) {
			a[i]=sc.nextInt();
		}
		return a;
	}
	static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


import java.util.*;
public class Code1{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int t = scan.nextInt();
        for(int i=0;i<t;i++){
            int n = scan.nextInt();
            int[] arr = new int[n];
            int sum =0;
            int even =0;
            int odd =0;
            for(int j=0;j<n;j++){
                arr[i] = scan.nextInt();
                if(arr[i]%2!=0){
                    odd++;
                }
                else{
                    even++;
                }
                sum+= arr[i];
            }
            if(sum%2!=0 ){
                System.out.println("YES");
            }
            else {
                if (odd != 0 && even != 0) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        }
    }

}


import java.util.*;
public class Code1{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int t = scan.nextInt();
        for(int i=0;i<t;i++){
            int n = scan.nextInt();
            int[] arr = new int[n];
            for(int j=0;j<n;j++){
                arr[i] = scan.nextInt();
            }
            System.out.println(result(arr,n));
        }
    }
    static String result(int[] arr, int n ){
        int sum =0;
        int even =0;
        int odd =0;
        for(int i=0;i<n;i++){
            if(arr[i]%2!=0 || arr[i] ==1){
                odd++;
            }
            else{
                even++;
            }
            sum+= arr[i];
        }
        if(sum%2!=0 || sum ==1){
            return "YES";
        }
        else{
            if(odd!=0 && even!=0){
                return "YES";
            }
            else{
                return "NO";
            }
        }
    }

}


import java.util.*;
public class Code1{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int t = scan.nextInt();
        for(int i=0;i<t;i++){
            int n = scan.nextInt();
            int[] arr = new int[n];
            int sum =0;
            int even =0;
            int odd =0;
            for(int j=0;j<n;j++){
                arr[j] = scan.nextInt();
                if(arr[j]%2!=0){
                    odd++;
                }
                else{
                    even++;
                }
                sum+= arr[i];
            }
            if(sum%2!=0 ){
                System.out.println("YES");
            }
            else {
                if (odd != 0 && even != 0) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        }
    }

}


import java.util.*;
public class Code1{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int t = scan.nextInt();
        for(int i=0;i<t;i++){
            int n = scan.nextInt();
            int[] arr = new int[n];
            for(int j=0;j<n;j++){
                arr[i] = scan.nextInt();
            }
            System.out.println(result(arr,n));
        }
    }
    static String result(int[] arr, int n ){
        int sum =0;
        int even =0;
        int odd =0;
        for(int i=0;i<n;i++){
            if(arr[i]%2!=0){
                odd++;
            }
            else{
                even++;
            }
            sum+= arr[i];
        }
        if(sum%2!=0){
            return "YES";
        }
        else{
            if(odd!=0 && even!=0){
                return "YES";
            }
            else{
                return "NO";
            }
        }
    }

}


import java.util.*;
public class Code1{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int t = scan.nextInt();
        for(int i=0;i<t;i++){
            int n = scan.nextInt();
            int[] arr = new int[n];
            int sum =0;
            int even =0;
            int odd =0;
            for(int j=0;j<n;j++){
                arr[j] = scan.nextInt();
                if(arr[j]%2!=0){
                    odd++;
                }
                else{
                    even++;
                }
                sum+= arr[j];
            }
            if(sum%2!=0 ){
                System.out.println("YES");
            }
            else {
                if (odd != 0 && even != 0) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        }
    }

}


import java.util.*;
public class Code1{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int t = scan.nextInt();
        for(int i=0;i<t;i++){
            int n = scan.nextInt();
            int[] arr = new int[n];
            int sum =0;
            int even =0;
            int odd =0;
            for(int j=0;j<n;j++){
                arr[j] = scan.nextInt();
                if(arr[i]%2!=0){
                    odd++;
                }
                else{
                    even++;
                }
                sum+= arr[i];
            }
            if(sum%2!=0 ){
                System.out.println("YES");
            }
            else {
                if (odd != 0 && even != 0) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        }
    }

}


import java.util.*;
import java.lang.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while(t-->0){
            int n=sc.nextInt();
            int arr[] = new int[n];
            int sum=0;
            boolean even = false;
            boolean odd = true;
            for(int i=0;i<n;i++){
              arr[i]=sc.nextInt();
              sum = sum + arr[i];
              if((arr[i] % 2)==0){
                even = true;
              }
              else{
                odd = true;
              }
            }
            if((sum % 2) != 0){
              System.out.println("YES");
            }
            else{
              if(even && odd){
                System.out.println("YES");
              }
              else{
                System.out.println("NO");
              }
            }
        }

    }
}


import java.util.*;
import java.lang.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while(t-->0){
            int n=sc.nextInt();
            int arr[] = new int[n];
            int sum=0;
            boolean even = false;
            boolean odd = false;
            for(int i=0;i<n;i++){
              arr[i]=sc.nextInt();
              sum = sum + arr[i];
              if((arr[i] % 2)==0){
                even = true;
              }
              else{
                odd = true;
              }
            }
            if((sum % 2) != 0){
              System.out.println("YES");
            }
            else{
              if(even && odd){
                System.out.println("YES");
              }
              else{
                System.out.println("NO");
              }
            }
        }

    }
}


import java.util.*;
import java.lang.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while(t-->0){
            int n=sc.nextInt();
            int a[] = new int[n];
            int sum=0;
            for(int i=0;i<n;i++){
                a[i]=sc.nextInt();
                sum = sum + a[i];
            }
        if(sum%2==0){
            System.out.println("NO");
        }
        else{
            System.out.println("YES");
        }
     }

    }
}


import java.util.*;
import java.io.*;

public class ASoln {

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while(st == null || !st.hasMoreElements()) {
				try {
					st= new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
	}

	public static void main(String[] args) {

		FastReader sc = new FastReader();
		int t = sc.nextInt();

		while(t-- > 0) {
			int n = sc.nextInt();

			int a[] = new int[n];

			for(int i =0; i<n; i++) {
				a[i] = sc.nextInt();
			}

			int c = 0;
			int even = 0;
			for(int i = 0; i<n; i++) {
				if(a[i]%2 != 0) {
					c++;
				}if(a[i]%2 == 0) {
					even++;
				}
			}
		if(n%2==0) {
			if(even == 0) {
				System.out.println("NO");
				}
			else if(c == 0) {
				System.out.println("NO");
			}else if(c != 0) {
				System.out.println("YES");
			}

			}else {
				if(c != 0) {
					System.out.println("YES");
				}else {
					System.out.println("NO");
				}
			}

		}
	}
}


import java.util.*;
import java.io.*;

public class ASoln {

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while(st == null || !st.hasMoreElements()) {
				try {
					st= new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
	}

	public static void main(String[] args) {

		FastReader sc = new FastReader();
		int t = sc.nextInt();

		while(t-- > 0) {
			int n = sc.nextInt();

			int a[] = new int[n];

			for(int i =0; i<n; i++) {
				a[i] = sc.nextInt();
			}

			int c = 0;
			for(int i = 0; i<n; i++) {
				if(a[i]%2 != 0) {
					c++;
				}
			}
			if(c %2 != 0) {
				System.out.println("YES");
			}else {
				System.out.println("NO");
				}

		}
	}

}


import java.util.*;
import java.io.*;

public class ASoln {

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while(st == null || !st.hasMoreElements()) {
				try {
					st= new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
	}

	public static void main(String[] args) {

		FastReader sc = new FastReader();
		int t = sc.nextInt();

		while(t-- > 0) {
			int n = sc.nextInt();

			int a[] = new int[n];

			for(int i =0; i<n; i++) {
				a[i] = sc.nextInt();
			}

			int c = 0;
			int even = 0;
			for(int i = 0; i<n; i++) {
				if(a[i]%2 != 0) {
					c++;
				}if(a[i]%2 == 0) {
					even++;
				}
			}
		if(n%2==0) {
			if(c != 0 && c%2 != 0) {
				System.out.println("YES");
			}if(even == 0) {
				System.out.println("NO");
				}
			else if(c == 0) {
				System.out.println("NO");
			}

			}else {
				if(c != 0) {
					System.out.println("YES");
				}else {
					System.out.println("NO");
				}
			}

		}
	}
}


import java.util.*;
import java.io.*;

public class ASoln {

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while(st == null || !st.hasMoreElements()) {
				try {
					st= new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
	}

	public static void main(String[] args) {

		FastReader sc = new FastReader();
		int t = sc.nextInt();

		while(t-- > 0) {
			int n = sc.nextInt();

			int a[] = new int[n];

			for(int i =0; i<n; i++) {
				a[i] = sc.nextInt();
			}
			int sum = 0;
			boolean even = false;
			boolean oddsum = false;
			int c = 0;
			for(int i = 0; i<n; i++) {
				if(a[i]%2==0) {
					even = true;
				}else {
					even = false;
					break;
				}
			}
			if(even) {
				System.out.println("NO");
			}else {
				if(n%2 != 0) {
					for(int i = 0; i<n; i++) {
					if(a[i]%2 != 0) {
						System.out.println("YES");
						break;
					   }
					}
				}else {
					for(int i = 0; i<n; i++) {
						if(a[i]%2 != 0) {
							c++;
						}
					}if(c %2 != 0) {
						System.out.println("YES");
					}else {
						System.out.println("NO");
					}

				}
			}
		}
	}

}


import java.util.*;
import java.io.*;

public class ASoln {

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while(st == null || !st.hasMoreElements()) {
				try {
					st= new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
	}

	public static void main(String[] args) {

		FastReader sc = new FastReader();
		int t = sc.nextInt();

		while(t-- > 0) {
			int n = sc.nextInt();

			int a[] = new int[n];

			for(int i =0; i<n; i++) {
				a[i] = sc.nextInt();
			}
			int sum = 0;

			for(int i = 0; i<n; i++) {
				sum+=a[i];
			}
			if(sum%2 == 0) {
				System.out.println("NO");
			}else {
				System.out.println("YES");
			}
		}
	}

}


import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

public class Solution {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        int cnt=0;
        while(t-->0)
        {
            String ans="";
             int n=sc.nextInt();
             int[] a=new int[n];
             for(int i=0;i<n;i++){
             a[i]=sc.nextInt();
             if(a[i]%2==0)
             cnt++;
             else
             cnt1++;
             }
             if(cnt==0 && cnt1==0)
             ans="NO";
             else if(cnt==cnt1)
             ans="YES";
             else if(cnt1==0)
             ans="NO";
             else if(cnt==0)
             {
             if(cnt%2!=0){
             ans="YES";
             else
             ans="NO"
             }
             else if(cnt!=0)
             ans="YES";
             System.out.println("NO");
        }
    }
}


import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

public class Solution {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        int cnt=0;
        while(t-->0)
        {
            String ans="";
             int n=sc.nextInt();
             int[] a=new int[n];
             for(int i=0;i<n;i++){
             a[i]=sc.nextInt();
             if(a[i]%2==0)
             cnt++;
             else
             cnt1++;
             }
             if(cnt==0 && cnt1==0)
             ans="NO";
             else if(cnt==cnt1)
             ans="YES";
             else if(cnt1==0)
             ans="NO";
             else if(cnt==0)
             {
             if(cnt%2!=0)
             ans="YES";
             else
             ans="NO";
             }
             else if(cnt!=0)
             ans="YES";
             System.out.println("NO");
        }
    }
}


import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

public class Solution {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        int cnt=0,cnt1=0;
        while(t-->0)
        {
            String ans="";
             int n=sc.nextInt();
             int[] a=new int[n];
             for(int i=0;i<n;i++){
             a[i]=sc.nextInt();
             if(a[i]%2==0)
             cnt++;
             else
             cnt1++;
             }
             if(cnt==0 && cnt1==0)
             ans="NO";
             else if(cnt==cnt1)
             ans="YES";
             else if(cnt1==0)
             ans="NO";
             else if(cnt==0)
             {
             if(cnt%2!=0)
             ans="YES";
             else
             ans="NO";
             }
             else if(cnt!=0)
             ans="YES";
             System.out.println("NO");
        }
    }
}


import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

public class Solution {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        //int cnt=0,cnt1=0;
        while(t-->0)
        {
            String ans="";
            int cnt[] =new int[2];
             int n=sc.nextInt();

             int[] a=new int[n];
             for(int i=0;i<n;i++){
             a[i]=sc.nextInt();
             if(a[i]%2==0)
             cnt[0]++;
             else
             cnt[1]++;
             }
             if(cnt[0]==0 && cnt[1]==0)
             ans="NO";
             else if(cnt[0]==cnt[1])
             ans="YES";
             else if(cnt[1]==0)
             ans="NO";
             else if(cnt[0]==0)
             {
             if(cnt[1]%2!=0)
             ans="YES";
             else
             ans="NO";
             }
             else if(cnt[0]!=0)
             ans="YES";
             System.out.println(ans);
        }
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for(int i = 0; i<t; i++){
            int n = sc.nextInt();
            int oddCount = 0;
            for(int j = 0; j<n; i++){
                int val = sc.nextInt();
                if(val%2==1){
                    oddCount++;
                }

            }
            if(n%2==0&&(oddCount==0||oddCount==n)){
                System.out.println("NO");
            }else{
                System.out.println("YES");
            }
        }
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for(int i = 0; i<t; i++){
            int n = sc.nextInt();
            int oddCount = 0;
            for(int j = 0; i<n; i++){
                int val = sc.nextInt();
                if(val%2==1){
                    oddCount++;
                }

            }
            if(n%2==0&&(oddCount==0||oddCount==n)){
                System.out.println("NO");
            }else{
                System.out.println("YES");
            }
        }
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while(n-->0){
            int len = sc.nextInt();
            int count = 0;
            for(int i = 0; i<len; i++){

                if(count%2==1){
                    count++;
                }
            }
            if(len%2==0&&(count==0||count==len)){
                System.out.println("No");
            }else{
                System.out.println("Yes");
            }
        }

    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for(int i = 0; i<t; i++){
            int n = sc.nextInt();
            int oddCount = 0;
            for(int j = 0; i<n; i++){
                int val = sc.nextInt();
                if(val%2==1){
                    oddCount++;
                }

                if(n%2==0&&(oddCount==0||oddCount==n)){
                    System.out.println("NO");
                }else{
                    System.out.println("YES");
                }
            }
        }

    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for(int i = 0; i<t; i++){
            int n = sc.nextInt();
            int oddCount = 0;
            for(int j = 0; i<n; i++){
                int val = sc.nextInt();
                if(val%2==1){
                    oddCount++;
                }
            }
            if(n%2==0&&(oddCount==0||oddCount==n)){
                System.out.println("No");
            }else{
                System.out.println("Yes");
            }
        }

    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for(int i = 0; i<t; i++){
            int n = sc.nextInt();
            int oddCount = 0;
            for(int j = 0; j<n; j++){
                int val = sc.nextInt();
                if(val%2==1){
                    oddCount++;
                }

            }
            if(n%2==0&&(oddCount==0||oddCount==n)||oddCount==0){
                System.out.println("NO");
            }else{
                System.out.println("YES");
            }
        }
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while(n-->0){
            int len = sc.nextInt();
            int count = 0;
            for(int i = 0; i<len; i++){

                if(count%2==1){
                    count++;
                }
            }
            if(count==0||(count%2==0&&count==len)){
                System.out.println("No");
            }else{
                System.out.println("Yes");
            }
        }

    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while(n-->0){
            int len = sc.nextInt();
            int count = 0;
            for(int i = 0; i<len; i++){
                count+=i;
                if(count%2==1){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
            }
        }
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for(int i = 0; i<t; i++){
            int n = sc.nextInt();
            int oddCount = 0;
            for(int j = 0; j<n; j++){
                int val = sc.nextInt();
                if(val%2==1){
                    oddCount++;
                }

            }
            if(n%2==0&&(oddCount==0||oddCount==n)){
                System.out.println("NO");
            }else{
                System.out.println("YES");
            }
        }
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while(n-->0){
            int len = sc.nextInt();
            int count = 0;
            for(int i = 0; i<len; i++){

                if(count%2==1){
                    count++;
                }
            }
            if(count==0||count%2==0){
                System.out.println("No");
            }else{
                System.out.println("Yes");
            }
        }

    }
}


import java.util.Scanner;
public class ArrayWithOddSum {
    public static void main(String args[]){
            Scanner sc = new Scanner(System.in);
            int t = sc.nextInt();

            for(int i=0;i<t;i++){
                int size = sc.nextInt();
                for(int j=0;j<size;j++){
                    int d=sc.nextInt();
                    if(d%2 == 0)
                        even++;
                    else
                        odd++;
                }
                if(even ==size)
                    System.out.println("NO");
                else if(odd==size && size%2==0)
                    System.out.println("NO");
                else
                    System.out.println("YES");
        }
    }
}


import java.util.Scanner;
public class ArrayWithOddSum {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        for(int i=0;i<t;i++){
            int size = sc.nextInt();
            int odd=0,even=0;
            for(int j=0;j<size;j++){
                int d=sc.nextInt();
                if(d%2 == 0)
                    even++;
                else
                    odd++;
            }
            if(odd%2==even)
                System.out.println("YES");
            else if(even >0 && odd >0 && odd%2==even)
                System.out.println("YES");
            else if(odd==size && size%2!=0)
                System.out.println("YES");
            else
                System.out.println("NO");
        }
    }
}


import java.util.Scanner;
public class ArrayWithOddSum {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        for(int i=0;i<t;i++){
            int size = sc.nextInt();
            int odd=0,even=0;
            for(int j=0;j<size;j++){
                int d=sc.nextInt();
                if(d%2 == 0)
                    even++;
                else
                    odd++;
                if(odd>0 && even >0)
                    break;
            }
            if(even >0 && odd >0)
                System.out.println("YES");
            else if(odd==size && size%2!=0)
                System.out.println("YES");
            else
                System.out.println("NO");
        }
    }
}


import java.util.Scanner;
public class ArrayWithOddSum {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        for(int i=0;i<t;i++){
            int size = sc.nextInt();
            int odd=0,even=0;
            for(int j=0;j<size;j++){
                int d=sc.nextInt();
                if(d%2 == 0)
                    even++;
                else
                    odd++;
            }
            if(odd%2==even)
                System.out.println("NO");
            else if(even >0 && odd >0 && odd%2==even)
                System.out.println("YES");
            else if(odd==size && size%2!=0)
                System.out.println("YES");
            else
                System.out.println("NO");
        }
    }
}


import java.util.*;
public class MyClass {
    public static void main(String args[]) {
      Scanner sc = new Scanner(System.in);
            int t = sc.nextInt();

            for(int i=0;i<t;i++){
                int size = sc.nextInt();
                int odd=0,even=0;
                for(int j=0;j<size;j++){
                    int d=sc.nextInt();
                    if(d%2 == 0)
                        even++;
                    else
                        odd++;
                }
                if(odd%2==even && even%2==0)
                    System.out.println("NO");
                else if(even >0 && odd >0 && odd%2==even)
                    System.out.println("YES");
                else if(odd==size && size%2!=0)
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
    }
}


import java.util.*;
public class MyClass {
          public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        for(int i=0;i<t;i++){
            int size = sc.nextInt();
            int even=0,odd=0;
            for(int j=0;j<size;j++){
                int d=sc.nextInt();
                if(d%2 == 0)
                    even++;
                else
                    odd++;
            }
            if(even ==size)
                System.out.println("NO");
            else if(odd==size && size%2==0)
                System.out.println("NO");
            else
                System.out.println("YES");
        }
    }
}


import java.util.*;

public class solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int res = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd += (a%2 == 1 ? 1 : 0);
            }
            if(odd%2 == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class Main{
    public static void main(String[] arr){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int tItr = 0; tItr < t; tItr++){
            float a = in.nextFloat();
            int count = 0;
            while(a > 0){
                count += (int) Math.round(a);
                a /= 10;
            }
            System.out.println(count);
        }
    }
}


import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            int even = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd += (a%2 == 1 ? 1 : 0);
                even += (a%2 == 0 ? 1 : 0);
            }
            if((odd%2 == 1 && even%2 == 0) && (odd%2 == 0 && even%2 == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd += (a%2 == 1 ? 1 : 0);
            }
            if(odd%2 == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class Solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            int even = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd += (a%2 == 1 ? 1 : 0);
                even += (a%2 == 0 ? 1 : 0);
            }
            if((odd%2 == 1 && even%2 == 0) || (odd%2 == 0 && even%2 == 0)){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.io.*;
import java.util.*;

public class solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int res = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                res += a;
            }
            if(res%2 == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class Solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            int even = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd += (a%2 == 1 ? 1 : 0);
                even += (a%2 == 0 ? 1 : 0);
            }
            if((odd%2 == 1 && even%2 == 0) || (odd%2 == 0 && even%2 == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.io.*;
import java.util.*;

public class solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int i = 0; i < t; i++){
            int n = in.nextInt();
            int res = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                res += a%2;
            }
            if(res == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class Solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            int even = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd += (a%2 == 1 ? 1 : 0);
                even += (a%2 == 0 ? 1 : 0);
            }
            if((odd%2 == 1 && even%2 == 0) || (odd%2 == 0 && even%2 == 0){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            int even = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd += (a%2 == 1 ? 1 : 0);
                even += (a%2 == 0 ? 1 : 0);
            }
            if((odd%2 == 1 && even%2 == 0) || (odd%2 == 0 && even%2 == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            int even = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                if(a%2 == 0){
                    even ++;
                } else {
                    odd ++;
                }
            }
            if((odd%2 == 1) || (odd%2 == 0 && even > 0 && odd !=0)){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            int even = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd += (a%2 == 1 ? 1 : 0);
                even += (a%2 == 0 ? 1 : 0);
            }
            if(odd%2 == 1 && even%2 == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.io.*;
import java.util.*;

public class solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int res = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                res += (a%2)%2;
            }
            if(res == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class Solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            int even = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd += (a%2 == 1 ? 1 : 0);
                even += (a%2 == 0 ? 1 : 0);
            }
            if((odd%2 == 1) || (odd%2 == 0 && even > 0)){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd = (a%2 == 1 ? 1 : 0);
            }
            if(odd == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


package com.company;

import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            int even = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd += (a%2 == 1 ? 1 : 0);
                even += (a%2 == 0 ? 1 : 0);
            }
            if((odd%2 == 1) || (odd%2 == 0 && even > 0 && odd !=0)){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int i = 0; i < t; i++){
            int n = in.nextInt();
            int res = 0;
            for(int j = 0; j < n; j++){
                int a = in.nextInt();
                res += a%2;
            }
            if(res == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.*;

public class solution{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        for(int j = 0; j < t; j++){
            int n = in.nextInt();
            int odd = 0;
            for(int i = 0; i < n; i++){
                int a = in.nextInt();
                odd = (a%2 == 1 ? 1 : 0);
            }
            if(odd%2 == 1){
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}


import java.util.Scanner;
public class Sumodd{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int count1 =0;
		int count2 =0;
		for(int i =0;i<a;i++){
			int b = in.nextInt();
			int[] arr = new int[b];
			for(int k = 0;k<arr.length;k++){
				arr[k] = in.nextInt();
				if(arr[k]%2==0){
					count1++;
				}else{
					count2++;
				}
			}
			if((b%2==0 && count2==b) || count1==b ){
				System.out.println("NO");
			}else {
				System.out.println("YES");
			}
			count1=0;
			count2=0;
		}
	}
}


import java.util.Scanner;
public class Sumodd{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int count =0;
		for(int i =0;i<a;i++){
			int b = in.nextInt();
			int[] arr = new int[b];
			for(int k = 0;k<arr.length;k++){
				arr[k] = in.nextInt();
				count+=arr[k];
			}
			if(count%2==0){
				System.out.println("NO");
			}else {
				System.out.println("YES");
			}
			count=0;
		}
	}
}


import java.util.Scanner;
public class Sumodd{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int count =0;
		for(int i =0;i<a;i++){
			int b = in.nextInt();
			int[] arr = new int[b];
			for(int k = 0;k<arr.length;k++){
				arr[k] = in.nextInt();
				count+=arr[k];
			}
			if(b!=0){
				if(count%2==0 ){
					System.out.println("NO");
				}else {
					System.out.println("YES");
				}
			}
			count=0;
		}
	}
}


import java.util.Collections;
import java.util.HashMap;
import java.util.Scanner;

public class ff {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
Scanner in=new Scanner(System.in);
HashMap<Integer,Integer> map=new HashMap<Integer,Integer>();
HashMap<Integer,Integer> mp=new HashMap<Integer,Integer>();

int n=in.nextInt();
	int x=in.nextInt();
	int a[]=new int[n];
	for(int i=0;i<n;i++)
		{
		a[i]=in.nextInt();
		map.putIfAbsent(a[i], 0);
		map.put(a[i], map.get(a[i])+1);
		}
	int max=Collections.max(map.values());
	if(max>=2)
		System.out.println(0);
	else
	{int t=0;
		for(int i=0;i<n;i++)
		{
			if(map.containsKey(x&a[i])&&x!=a[i]&&((x&a[i])!=a[i]))
				{
				System.out.println(1);t=1;break;
				}

			mp.putIfAbsent(x&a[i], 0);
			mp.put(x&a[i], mp.get(x&a[i])+1);

		}
		if(t==0)
		if(Collections.max(mp.values())>=2)
			System.out.println(2);
		else
			System.out.println(-1);

	}

	}

}


import java.util.*;
public class a
{
    static int mod = (int) 1e9 + 7;
    static int Infinity=Integer.MAX_VALUE;
    static int negInfinity=Integer.MIN_VALUE;
    public static void main(String args[])
    {
        Scanner d= new Scanner(System.in);
        int n,x,i,z;
        n=d.nextInt();
        x=d.nextInt();
        int a[]=new int[n];
        Set <Integer> s=new HashSet<>();
        Set <Integer> s1=new HashSet<>();
        for(i=0;i<n;i++)
        a[i]=d.nextInt();
        z=-1;
        for(i=0;i<n;i++)
        {
            if(s.isEmpty())
            {s.add(a[i]);
             s1.add(a[i]&x);
            }
            else if(s.contains(a[i]))
            {
                z=0;
            }
            else if(s.contains(a[i]&x) || s1.contains(a[i]))
            {
                if(z>1)
                z=1;
            }
            else
            {
                s.add(a[i]);
                s1.add(a[i]&x);
            }
        }
        if(s1.size()<s.size() && z==-1)
        System.out.println(2);
        else
        System.out.println(z);
    }
}


import java.util.*;
public class a
{
    static int mod = (int) 1e9 + 7;
    static int Infinity=Integer.MAX_VALUE;
    static int negInfinity=Integer.MIN_VALUE;
    public static void main(String args[])
    {
        Scanner d= new Scanner(System.in);
        int n,x,i,z;
        n=d.nextInt();
        x=d.nextInt();
        int a[]=new int[n];
        Set <Integer> s=new HashSet<>();
        Set <Integer> s1=new HashSet<>();
        for(i=0;i<n;i++)
        a[i]=d.nextInt();
        z=-1;
        for(i=0;i<n;i++)
        {
            if(s.isEmpty())
            {s.add(a[i]);
             s1.add(a[i]&x);
            }
            else if(s.contains(a[i]))
            {
                z=0;
                break;
            }
            else if(s.contains(a[i]&x))
            {
                z=1;
                break;
            }
            else
            {
                s.add(a[i]);
                s1.add(a[i]&x);
            }
        }
        if(s1.size()<s.size() && z==-1)
        System.out.println(2);
        else
        System.out.println(z);
    }
}


import java.util.*;
public class a
{
    static int mod = (int) 1e9 + 7;
    static int Infinity=Integer.MAX_VALUE;
    static int negInfinity=Integer.MIN_VALUE;
    public static void main(String args[])
    {
        Scanner d= new Scanner(System.in);
        int n,x,i,z;
        n=d.nextInt();
        x=d.nextInt();
        int a[]=new int[n];
        Set <Integer> s=new HashSet<>();
        Set <Integer> s1=new HashSet<>();
        for(i=0;i<n;i++)
        a[i]=d.nextInt();
        z=-1;
        for(i=0;i<n;i++)
        {
            if(s.isEmpty())
            {s.add(a[i]);
             s1.add(a[i]&x);
            }
            else if(s.contains(a[i]))
            {
                z=0;
            }
            else if(s.contains(a[i]&x) || s1.contains(a[i]))
            {
                if(z!=0)
                {z=1;
                s.add(a[i]);}
            }
            else
            {
                s.add(a[i]);
                s1.add(a[i]&x);
            }
        }
        if(s1.size()<s.size() && z==-1)
        System.out.println(2);
        else
        System.out.println(z);
    }
}


import java.util.*;
public class a
{
    static int mod = (int) 1e9 + 7;
    static int Infinity=Integer.MAX_VALUE;
    static int negInfinity=Integer.MIN_VALUE;
    public static void main(String args[])
    {
        Scanner d= new Scanner(System.in);
        int n,x,i,z;
        n=d.nextInt();
        x=d.nextInt();
        int a[]=new int[n];
        Set <Integer> s=new HashSet<>();
        Set <Integer> s1=new HashSet<>();
        for(i=0;i<n;i++)
        a[i]=d.nextInt();
        z=-1;
        for(i=0;i<n;i++)
        {
            if(s.isEmpty())
            {s.add(a[i]);
             s1.add(a[i]&x);
            }
            else if(s.contains(a[i]))
            {
                z=0;
            }
            else if(s.contains(a[i]&x) || s1.contains(a[i]))
            {
                if(z!=0)
                z=1;
            }
            else
            {
                s.add(a[i]);
                s1.add(a[i]&x);
            }
        }
        if(s1.size()<s.size() && z==-1)
        System.out.println(2);
        else
        System.out.println(z);
    }
}


import java.util.*;
public class a
{
    static int mod = (int) 1e9 + 7;
    static int Infinity=Integer.MAX_VALUE;
    static int negInfinity=Integer.MIN_VALUE;
    public static void main(String args[])
    {
        Scanner d= new Scanner(System.in);
        int n,x,i,z;
        n=d.nextInt();
        x=d.nextInt();
        int a[]=new int[n];
        Set <Integer> s=new HashSet<>();
        Set <Integer> s1=new HashSet<>();
        for(i=0;i<n;i++)
        a[i]=d.nextInt();
        z=-1;
        for(i=0;i<n;i++)
        {
            if(s.isEmpty())
            {s.add(a[i]);
             s1.add(a[i]&x);
            }
            else if(s.contains(a[i]))
            {
                z=0;
                break;
            }
            else if(s.contains(a[i]&x) || s1.contains(a[i]))
            {
                z=1;
                break;
            }
            else
            {
                s.add(a[i]);
                s1.add(a[i]&x);
            }
        }
        if(s1.size()<s.size() && z==-1)
        System.out.println(2);
        else
        System.out.println(z);
    }
}


import java.io.*;
import java.util.*;

public class CFB {

    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 1000L * 1000L * 1000L + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "Yes";
    private static final String no = "No";

    void solve() throws IOException {
        int n = nextInt();
        int x = nextInt();
        int[] arr = nextIntArr(n);
        int limit = 200000 + 10;
        int[] hist = new int[limit];
        for (int v : arr) {
            hist[v]++;
        }

        for (int v : hist) {
            if (v >= 2) {
                outln(0);
                return;
            }
        }

        int res = Integer.MAX_VALUE;
        List<List<Integer>> cnts = new ArrayList<>();
        for (int i = 0; i < limit; i++) {
            cnts.add(new ArrayList<>());
        }

        for (int j = 0; j < limit; j++) {
            if (hist[j] > 0) {
                List<Integer> ls = findList(j, x);
                for (int i = 0; i < ls.size(); i++) {
                    cnts.get(ls.get(i)).add(i);
                }
            }
        }

        for (List<Integer> cnt : cnts) {
            Collections.sort(cnt);
            if (cnt.size() >= 2) {
                res = Math.min(res, cnt.get(0) + cnt.get(1));
            }
        }

        outln(res == Integer.MAX_VALUE ? -1 : res);
    }

    List<Integer> findList(int start, int x) {
        List<Integer> res = new ArrayList<>();
        res.add(start);
        while ((start & x) != start) {
            res.add(start & x);
            start = start & x;
        }

        return res;
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }
    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    private void formatPrint(double val) {
        outln(String.format("%.9f%n", val));
    }
    public CFB() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFB();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}


import java.io.*;
import java.util.*;

public class CFB {

    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 1000L * 1000L * 1000L + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "Yes";
    private static final String no = "No";

    void solve() throws IOException {
        int n = nextInt();
        int x = nextInt();
        int[] arr = nextIntArr(n);
        int limit = 200000 + 10;
        int[] hist = new int[limit];
        for (int v : arr) {
            hist[v]++;
        }

        for (int v : hist) {
            if (v >= 2) {
                outln(0);
                return;
            }
        }

        int res = Integer.MAX_VALUE;
        for (int i = 0; i < limit; i++) {
            if (hist[i] != 0) {
                int start = i;
                int cnt = 0;
                boolean succ = false;
                while ((start & x) != start) {
                    cnt++;
                    int nxt = start & x;
                    if (hist[nxt] > 0) {
                        succ = true;
                        break;
                    }
                    start = nxt;
                }

                if (succ) {
                    res = Math.min(res, cnt);
                }
            }
        }

        outln(res == Integer.MAX_VALUE ? -1 : res);
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }
    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    private void formatPrint(double val) {
        outln(String.format("%.9f%n", val));
    }
    public CFB() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFB();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}


import java.io.*;
import java.util.*;

public class CFB {

    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 1000L * 1000L * 1000L + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "Yes";
    private static final String no = "No";

    void solve() throws IOException {
        int n = nextInt();
        int x = nextInt();
        int[] arr = nextIntArr(n);
//        int limit = 200000 + 10;
        int limit = 20;
        int[] hist = new int[limit];
        for (int v : arr) {
            hist[v]++;
        }

        for (int v : hist) {
            if (v >= 2) {
                outln(0);
                return;
            }
        }

        int res = Integer.MAX_VALUE;
        List<List<Integer>> cnts = new ArrayList<>();
        for (int i = 0; i < limit; i++) {
            cnts.add(new ArrayList<>());
        }

        for (int j = 0; j < limit; j++) {
            if (hist[j] > 0) {
                List<Integer> ls = findList(j, x);
                for (int i = 0; i < ls.size(); i++) {
                    cnts.get(ls.get(i)).add(i);
                }
            }
        }

        for (List<Integer> cnt : cnts) {
            Collections.sort(cnt);
            if (cnt.size() >= 2) {
                res = Math.min(res, cnt.get(0) + cnt.get(1));
            }
        }

        outln(res == Integer.MAX_VALUE ? -1 : res);
    }

    List<Integer> findList(int start, int x) {
        List<Integer> res = new ArrayList<>();
        res.add(start);
        while ((start & x) != start) {
            res.add(start & x);
            start = start & x;
        }

        return res;
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }
    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    private void formatPrint(double val) {
        outln(String.format("%.9f%n", val));
    }
    public CFB() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFB();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}


//package codeforces.Round500;

import java.util.HashMap;
import java.util.Scanner;

public class And {
    private static HashMap<Integer, Boolean> input;
    private static HashMap<Integer, Boolean> and;

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int x = s.nextInt();

        input = new HashMap<>(n);
        and = new HashMap<>(n);

        boolean zero = false;
        boolean one = false;
        boolean two = false;
        for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int inverse = a & x;
            if (input.containsKey(a)) zero = true;
            else if (input.containsKey(inverse)) one = true;
            else if (and.containsKey(inverse)) two = true;
            input.put(a, true);
            and.put(a & x, true);
        }
        if (zero) System.out.println("0");
        else if (one) System.out.println("1");
        else if (two) System.out.println("2");
        else System.out.println("-1");
    }

}


//package codeforces.Round500;

import java.util.HashMap;
import java.util.Scanner;

public class And {
    private static HashMap<Integer, Boolean> input;
    private static HashMap<Integer, Boolean> and;

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int x = s.nextInt();

        input = new HashMap<>(n);
        and = new HashMap<>(n);

        boolean zero = false;
        boolean one = false;
        boolean two = false;
        for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int inverse = a & x;
            if (input.containsKey(a)) zero = true;
            else if (and.containsKey(inverse)) two = true;
            input.put(a, true);
            and.put(inverse, true);
        }
        for (Integer key: and.keySet()) if (input.containsKey(key)) one = true;
        if (zero) System.out.println("0");
        else if (one) System.out.println("1");
        else if (two) System.out.println("2");
        else System.out.println("-1");
    }

}


//package codeforces.Round500;

import java.util.HashMap;
import java.util.Scanner;

public class And {

    private static HashMap<Integer, Boolean> visited;
    private static HashMap<Integer, Boolean> visitedAnd;

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int x = s.nextInt();

        visited = new HashMap<>(n);
        visitedAnd = new HashMap<>(n);

        boolean zero = false;
        boolean one = false;
        boolean two = false;

        for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int inverse = a & x;
            if (visited.containsKey(a)) zero = true;
            else if (visited.containsKey(inverse)) one = true;
            else if (visitedAnd.containsKey(a)) one = true;
            else if (visitedAnd.containsKey(inverse)) two = true;
            visited.put(a, true);
            visitedAnd.put(inverse, true);
        }

        if (zero) System.out.println("0");
        else if (one) System.out.println("1");
        else if (two) System.out.println("2");
        else System.out.println("-1");
    }

}


import java.io.*;
import java.lang.*;
public class CF1013B {
    public static void main(String args[]) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        int x = Integer.parseInt(s[1]);
        boolean[] arr = new boolean[100001];
        boolean[] arr2 = new boolean[100001];
        int[] a = new int[n];
        s = br.readLine().split(" ");
        for(int i=0;i<n;i++){
            a[i] = Integer.parseInt(s[i]);

        }

        int ans = 200;
        for(int i=0;i<n;i++){
            if(arr[a[i]]){
                ans = Math.min(ans, 0);
            }else if(arr[a[i]&x]){
                ans = Math.min(ans, 1);
                System.out.println(a[i] + " "+(a[i]&x));
                break;
            }else if(arr2[a[i] & x]){
                ans = Math.min(ans, 2);
            }
            arr2[a[i]&x] = true;
            arr[a[i]] = true;
        }
        if(ans == 200){
            ans = -1;
        }
        System.out.println(ans);

    }
}


import java.io.*;
import java.lang.*;
public class CF1013B {
    public static void main(String args[]) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        int x = Integer.parseInt(s[1]);
        boolean[] arr = new boolean[100001];
        boolean[] arr2 = new boolean[100001];
        int[] a = new int[n];
        s = br.readLine().split(" ");
        for(int i=0;i<n;i++){
            a[i] = Integer.parseInt(s[i]);

        }

        int ans = 200;
        for(int i=0;i<n;i++){
            if(arr[a[i]]){
                ans = Math.min(ans, 0);
            }else if(arr[a[i]&x]){
                ans = Math.min(ans, 1);
                //System.out.println(a[i] + " "+(a[i]&x));
                break;
            }else if(arr2[a[i]]){
                ans = Math.min(ans, 1);
            }else if(arr2[a[i] & x]){
                ans = Math.min(ans, 2);
            }
            arr2[a[i]&x] = true;
            arr[a[i]] = true;
        }
        if(ans == 200){
            ans = -1;
        }
        System.out.println(ans);

    }
}


import java.io.*;
import java.lang.*;
public class CF1013B {
    public static void main(String args[]) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        int x = Integer.parseInt(s[1]);
        boolean[] arr = new boolean[100001];
        boolean[] arr2 = new boolean[100001];
        int[] a = new int[n];
        s = br.readLine().split(" ");
        for(int i=0;i<n;i++){
            a[i] = Integer.parseInt(s[i]);

        }

        int ans = 200;
        for(int i=0;i<n;i++){
            if(arr[a[i]]){
                ans = Math.min(ans, 0);
            }else if(arr[a[i]&x]){
                ans = Math.min(ans, 1);
                //System.out.println(a[i] + " "+(a[i]&x));
                break;
            }else if(arr2[a[i] & x]){
                ans = Math.min(ans, 2);
            }
            arr2[a[i]&x] = true;
            arr[a[i]] = true;
        }
        if(ans == 200){
            ans = -1;
        }
        System.out.println(ans);

    }
}