You are given a sequence of numbers a1, a2, ..., an, and a number m.

Check if it is possible to choose a non-empty subsequence aij such that the sum of numbers in this subsequence is divisible by m.

Input

The first line contains two numbers, n and m (1 ≤ n ≤ 106, 2 ≤ m ≤ 103) — the size of the original sequence and the number such that sum should be divisible by it.

The second line contains n integers a1, a2, ..., an (0 ≤ ai ≤ 109).

Output

In the single line print either "YES" (without the quotes) if there exists the sought subsequence, or "NO" (without the quotes), if such subsequence doesn't exist.

Examples

Input

3 5
1 2 3


Output

YES


Input

1 6
5


Output

NO


Input

4 6
3 1 1 3


Output

YES


Input

6 6
5 5 5 5 5 5


Output

YES

Note

In the first sample test you can choose numbers 2 and 3, the sum of which is divisible by 5.

In the second sample test the single non-empty subsequence of numbers is a single number 5. Number 5 is not divisible by 6, that is, the sought subsequence doesn't exist.

In the third sample test you need to choose two numbers 3 on the ends.

In the fourth sample test you can take the whole subsequence.
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.StringTokenizer;



public final class CF_319_ModuloSum {

	void log(int[] X){
		int L=X.length;
		for (int i=0;i<L;i++){
			logWln(X[i]+" ");
		}
		log("");
	}


	void log(long[] X){
		int L=X.length;
		for (int i=0;i<L;i++){
			logWln(X[i]+" ");
		}
		log("");
	}
	void log(Object[] X){
		int L=X.length;
		for (int i=0;i<L;i++){
			logWln(X[i]+" ");
		}
		log("");
	}


	void log(Object o){
		logWln(o+"\n");
	}

	void logWln(Object o){
		//System.out.print(o);
		outputWln(o);

	}
	void info(Object o){
		System.out.println(o);
		//output(o);
	}

	void output(Object o){

		outputWln(""+o+"\n");

	}

	void outputWln(Object o){
		// System.out.print(o);

		try {
			out.write(""+ o);
		} catch (Exception e) {

		}
	}

	int[] achieved,updated;

	String solve(){
		achieved=new int[M];
		updated=new int[M];
		for (int i=0;i<N;i++){
			//	log("i:"+i);
			int v=a[i];
			if (v==0)
				return "YES";
			if (achieved[v]==0) {
				achieved[v]=1;
				updated[v]=i+1;
			}
			for (int j=0;j<M;j++){
				if (achieved[j]>0 && updated[j]<i+1){
					//	log("j:"+j);
					int u=(j+v)%M;
					if (u==0)
						return "YES";
					if (achieved[u]==0){
						achieved[u]=1;
						updated[u]=i+1;
					}
				}
			}

			//log(achieved);
		}

		return "NO";
	}

	String solve2(){
		int[] stack=new int[M];
		int LL=0;
		updated=new int[M];
		for (int i=0;i<N;i++){
			//	log("i:"+i);
			int v=a[i];
			if (v==0)
				return "YES";
			int L=LL;
			for (int u=0;u<L;u++){
				int x=stack[u];
				int y=(x+v)%M;
				if (y==0)
					return "YES";
				if (updated[y]==0){
					updated[y]=i+1;
					stack[LL++]=y;
				}
			}
			if (updated[v]==0) {
				updated[v]=i+1;
				stack[LL++]=v;
			}
				//log(achieved);
		}

		return "NO";
	}
	
	int N,M;
	int[] a;
	BufferedWriter out;

	void process() throws Exception {


		out = new BufferedWriter(new OutputStreamWriter(System.out));
		InputReader reader=new InputReader(System.in);

		N=reader.readInt();
		M=reader.readInt();
		a=new int[N];
		for (int i=0;i<N;i++) {
			a[i]=reader.readInt()%M;
		}
		output(solve2());
		//	log(achieved);

		try {
			out.close();
		}
		catch (Exception e){}


	}



	public static void main(String[] args) throws Exception {
		CF_319_ModuloSum J=new CF_319_ModuloSum();

		J.process();


	}


	static final class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

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

		private int read() throws IOException {
			if (curChar >= numChars) {
				curChar = 0;
				numChars = stream.read(buf);
				if (numChars <= 0) {
					return -1;
				}
			}
			return buf[curChar++];
		}


		public final String readString() throws IOException {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res=new StringBuilder();
			do {
				res.append((char)c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public final int readInt() throws IOException {
			int c = read();
			boolean neg=false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d=(char)c;
			//log("d:"+d);
			if (d=='-') {
				neg=true;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			//log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		public final long readLong() throws IOException {
			int c = read();
			boolean neg=false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d=(char)c;
			//log("d:"+d);
			if (d=='-') {
				neg=true;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			//log("res:"+res);
			if (neg)
				return -res;
			return res;

		}




		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
	}

}