Problems
Given two natural numbers
For example, if
There are 8 primes, their sum is 620, and the minimum is 61.
Input
The first line contains the integer
The second line contains the integer
1 \le M \le N \le 10,000 Both
M andN are natural numbers.
Output
If there are prime numbers between
The sum of all primes in the range.
The smallest prime in the range.
If there are no primes in the range, print -1 on the first line.
Example
60
100
620
61
Tag
Source
KOI λ³Έμ 2006 μ€1