Problem: Karan's mathematics professor has given him a lots of homework. Since he is busy preparing for September Easy Challenge, he needs your help.

Given two numbers, find the sum of prime numbers between them, both inclusive. 

Input:

The first line contains the number of test cases T. Each test case contains two space separated integers.

Output:

Print the answer on a new line for each case.

Constraints:

1 ≤ T ≤ 100

1 ≤ a,b < 10^6

SAMPLE INPUT
1
1 5

SAMPLE OUTPUT
10

Solution (in PYTHON):

Solution:
from math import sqrt; from itertools import count, islice

def prime(n):
    if n < 2: return False
    return all(n%i for i in islice(count(2), int(sqrt(n)-1)))


t = int(raw_input())
while t:
	t-=1
	y,z= map(int,raw_input().split())
	summ = 0
	while y<=z:
		if prime(y):
			summ+=y
		y+=1
	print summ