Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
E. Morrowindows

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputVasya 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 *a*_{i} items. In addition, each mode shows how many pages *b*_{i} 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 *a*_{i}, *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 *a*_{i}, *x* and he is able to know number *b*_{i} after viewing items in mode *i*.

Input

The first line contains two integers *n* and *x* (0 ≤ *n* ≤ 10^{5}, 2 ≤ *x* ≤ 10^{9}). The second line contains integers *a*_{i} (1 ≤ *a*_{i} ≤ 10^{9}). Some numbers among all *a*_{i} 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.

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: May/09/2021 14:15:07 (j2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|