Vasya plays The Elder Trolls III: Morrowindows. He has a huge list of items in the inventory, however, there is no limits on the size of things. Vasya does not know the total amount of items but he is sure that are not more than x and not less than 2 items in his inventory. A new patch for the game appeared to view inventory in n different modes. Displaying in mode i is a partition of all inventory items on pages, each of which (except for maybe the last one) shows exactly ai items. In addition, each mode shows how many pages bi is in a complete list. Great! Perhaps this information will be enough for Vasya to find the required number. Moreover, it is very interesting, what is the fewest number of modes in which Vasya can see inventory to determine the number of items in it?

Vasya cannot use the information that was received while looking on inventory in some mode for selection of next actions. I. e. Vasya chooses some set of modes first, and then sees all the results and determines the size.

Knowing the number of ai, x and assuming that Vasya is very smart, check whether he can uniquely determine the number of items in his inventory, and how many modes he will need to do that if he knows numbers ai, x and he is able to know number bi after viewing items in mode i.

Input

The first line contains two integers n and x (0 ≤ n ≤ 105, 2 ≤ x ≤ 109). The second line contains integers ai (1 ≤ ai ≤ 109). Some numbers among all ai may be equal.

Output

Output the fewest amount of modes required to uniquely determine amount of items in the inventory. If there is no solution output  - 1.

Examples

Input

2 4
2 3


Output

2


Input

1 4
2


Output

-1

Note

In the second example Vasya is not able to determine items count uniquely because 3 items, as well as 4 items, can be displayed on two pages.
import java.io.*;
import java.lang.Math;
import java.util.*;

public class Main
{	
	public BufferedReader in;
	public PrintStream out;
	
	public boolean log_enabled = true;
	
	private class BitVector
	{
		int[] b;
		
		boolean get(int k)
		{
			if (k==2)
			{
				k=0;
			}
			else
			{
				k >>= 1;
			}
			
			int pos = k >> 5;
			int bit = k & 31;
			
			return (b[pos] & (1 << bit)) == 0 ? false : true;
		}
		
		void set(int k, boolean val)
		{
			if (k==2)
			{
				k=0;
			}
			else
			{
				k >>= 1;
			}
			
			int pos = k >> 5;
			int bit = k & 31;
			
			int mask = (1 << bit);
			
			if (val)
			{
				b[pos] = (b[pos] | mask);
			}
			else
			{
				mask = ~mask;
				b[pos] = b[pos] &  mask;
			}
		}
		
		BitVector(int size)
		{
			b = new int[size/64+1];
			Arrays.fill(b, 0xffffffff);
		}
	}
	
	private class Sieve
	{
		int count;
		private BitVector v;
		
		Sieve(int n)
		{
			int sqrt = (int)Math.sqrt(n);
			
			v = new BitVector(n);
			
			count = (n+1)/2;
			
			int ii,i,j;
			for (ii=1; 2*ii<sqrt; ii++)
			{
				i = 2*ii+1;
				
				if (v.get(i))
				{
					for (j=i; i*j<=n; j+=2)
					{
						if (v.get(i*j))
						{
							count--;
						}
						v.set(i*j, false);
					}
				}
			}
		}
		
		boolean is_prime(int x)
		{
			return (x==2) || (((x&1)==1) && v.get(x));
		}
	}
	
	public void test()
	{
		int n = readInt();
		int x = readInt();
		
		int[] a = readIntArray(n);
		
		if (x==2)
		{
			out.println(0);
			return;
		}
		
		if (x>2000000)
		{
			for (int i=0; i<n; i++)
			{
				if (a[i]==1)
				{
					out.println(1);
					return;
				}
			}
		
			out.println(-1);
			return;
		}
		
		Sieve s = new Sieve(x-1);

		BitVector is_new = new BitVector(x);
		
		int count = 0;
		
		for (int i=0; i<n; i++)
		{
			if (a[i]==1)
			{
				out.println(1);
				return;
			}
		
			if ((a[i]<x) && s.is_prime(a[i]) && is_new.get(a[i]))
			{
				is_new.set(a[i], false);
				count++;
			}
		}
		
		if  (count == s.count)
		{
			out.println(count);
		}
		else
		{
			out.println(-1);
		}
		
	}
    
	public void run()
	{
		try
		{
			in = new BufferedReader(new InputStreamReader(System.in));
			out = System.out;
			
			//in = new BufferedReader(new FileReader("in.txt"));
			//out = new PrintStream(new File("out.txt"));
			
			
		}
		catch (Exception e)
		{
			return;
		}
		
		//while (true)
		{
			//int t = readInt(); for (int i=0; i<t; i++)					
			{
				test();
			}
		}
	}
	
	public static void main(String args[])
	{
		new Main().run();
	}
	
	private StringTokenizer tokenizer = null;
	
	public int readInt() 
	{
        return Integer.parseInt(readToken());
    }
   
    public long readLong() 
	{
        return Long.parseLong(readToken());
    }
   
    public double readDouble() 
	{
        return Double.parseDouble(readToken());
    }
   
	public String readLn()
	{	
		try
		{
			String s;
			while ((s = in.readLine()).length()==0);
			return s;
		}
		catch (Exception e)
		{
			return "";
		}
	}
	
    public String readToken() 
	{
		try
		{
			while (tokenizer == null || !tokenizer.hasMoreTokens()) 
			{
				tokenizer = new StringTokenizer(in.readLine());
			}
			return tokenizer.nextToken();
		}
		catch (Exception e)
		{
			return "";
		}
    }
	
	public int[] readIntArray(int n)
	{
		int[] x = new int[n];
		readIntArray(x, n);
		return x;
	}
	
	public void readIntArray(int[] x, int n)
	{
		for (int i=0; i<n; i++)
		{
			x[i] = readInt();
		}
	}
	
	public void logWrite(String format, Object... args)
	{
		if (!log_enabled)
		{
			return;
		}
		
		out.printf(format, args);
	}
}

