#t21. 统计M到N区间内素数个数并求和

统计M到N区间内素数个数并求和

Primes in an Interval

Problem Description

Given two positive integers M and N, count the number of primes in the interval [M, N] (including both M and N), and compute their sum.

Input Format

Input two positive integers M and N on one line (1 ≤ M ≤ N ≤ 500).

Output Format

Output two integers on one line: the count of primes in [M, N] and their sum, separated by a single space.

Sample Input

10 31

Sample Output

7 143

Constraints

1 ≤ M ≤ N ≤ 500