eolymp
bolt
Try our new interface for solving problems
Problems

Prime Sums

Prime Sums

Time limit 2 seconds
Memory limit 128 MiB

There is a set S = {x[1], x[2], ..., x[n]} and a integer k. Can you tell how many sums of k integers in S which the sums are all primes?

Input data

There are several tests, each test contains two lines. The first line consist of an integer n (1n20) and the integer k (1kn), the second line contains n integers x[1], x[2], ..., x[N] (1x[i]5000000).

Output data

For each test case print in a single line the number of required sums.

Examples

Input example #1
3 2
7 6 5
Output example #1
2