Prime Sums#1270

Prime Sums

2 seconds
128 megabytes
Easy

There is a set S = \{x_1, x_2, \ldots, x_n\} and an integer . Count how many sums of elements from the set are prime numbers.

Input

There are several test cases. Each test consists of two lines. The first line contains integers (1 \leq n \leq 20) and (1 \leq k \leq n). The second line contains integers x_1, x_2, \ldots, x_n (1 \leq x_i \leq 5000000).

Output

For each test case, output the number of such sums on a separate line.

Examples

Example 1

Loading
Loading