{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cspan lang\u003d\"en-us\"\u003e\u003cp\u003eA positive integer may be expressed as a sum of different prime numbers (primes), in one way or another. Given two positive integers \u003ci\u003en\u003c/i\u003e and \u003ci\u003ek\u003c/i\u003e, you should count the number of ways to express \u003ci\u003en\u003c/i\u003e as a sum of \u003ci\u003ek\u003c/i\u003e different primes. Here, two ways are considered to be the same if they sum up the same set of the primes. For example, 8 can be expressed as 3 + 5 and 5 + 3 but the are not distinguished.\u003c/p\u003e\u003cp\u003eWhen \u003ci\u003en\u003c/i\u003e and \u003ci\u003ek\u003c/i\u003e are 24 and 3 respectively, the answer is two because there are two sets {2, 3, 19} and {2, 5, 17} whose sums are equal to 24. There are not other sets of three primes that sum up to 24. For \u003ci\u003en\u003c/i\u003e \u003d 24 and \u003ci\u003ek\u003c/i\u003e \u003d 2, the answer is three, because there are three sets {5, 19}, {7, 17} and {11, 13}. For \u003ci\u003en\u003c/i\u003e \u003d 2 and \u003ci\u003ek\u003c/i\u003e \u003d 1, the answer is one, because there is only one set {2} whose sum is 2. For \u003ci\u003en\u003c/i\u003e \u003d 1 and \u003ci\u003ek\u003c/i\u003e \u003d 1, the answer is zero. As 1 is not a prime, you shouldn’t count {1}. For \u003ci\u003en\u003c/i\u003e \u003d 4 and \u003ci\u003ek\u003c/i\u003e \u003d 2, the answer is zero, because there are no sets of two different primes whose sums are 4.\u003c/p\u003e\u003cp\u003eYour job is to write a program that reports the number of such ways for the given \u003ci\u003en\u003c/i\u003e and \u003ci\u003ek\u003c/i\u003e.\u003c/p\u003e\u003c/span\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cspan lang\u003d\"en-us\"\u003e\u003cp\u003eThe input is a sequence of datasets followed by a line containing two zeros separated by a space. A dataset is a line containing two positive integers \u003ci\u003en\u003c/i\u003e and \u003ci\u003ek\u003c/i\u003e separated by a space. You may assume that \u003ci\u003en\u003c/i\u003e ≤ 1120 and \u003ci\u003ek\u003c/i\u003e ≤ 14.\u003c/p\u003e\u003c/span\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eThe output should be composed of lines, each corresponding to an input dataset. An output line should contain one non-negative integer indicating the number of the ways for \u003ci\u003en\u003c/i\u003e and \u003ci\u003ek\u003c/i\u003e specified in the corresponding dataset. You may assume that it is less than 2\u003csup\u003e31\u003c/sup\u003e.\u003c/p\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e24 3 \r\n24 2 \r\n2 1 \r\n1 1 \r\n4 2 \r\n18 3 \r\n17 1 \r\n17 3 \r\n17 4 \r\n100 5 \r\n1000 10 \r\n1120 14 \r\n0 0\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2 \r\n3 \r\n1 \r\n0 \r\n0 \r\n2 \r\n1 \r\n0 \r\n1 \r\n55 \r\n200102899 \r\n2079324314\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}