Count DePrimes

A number is called a DePrime if the sum of its prime factors is a prime number. Given a and b count the number of DePrimes xi such that a ≤ xi ≤ b. Input Eachlinecontainsaandbintheformat‘ab’. 2≤a≤5000000. a≤b≤5000000. Input is terminated by a line containing ‘0’. Output Each line should contain the number of DePrimes for the corresponding test case. Explanation: In Test Case 2, take 10. Its Prime Factors are 2 and 5. Sum of Prime Factors is 7, which is a prime. So, 10 is a DePrime. Sample Input 25 10 21 100 120 0 Sample Output 4 9 9