SP10968 LUCIFER - LUCIFER Number

Description

Lucifer is the only human whi has defeated RA-ONE in a computer game .. RA-One is after lucifer for revenge and G-One is there to protect him ... All thi G-One and Ra-one Nonsense has disturbed lucifers life.. He wants to get Rid of Ra-One and kill him . He found that Ra-One can be killed only by throwing Lucifer number of weapons at him. Lucifer number shares the some properties of [Ra-One Numbers](https://www.spoj.com/problems/RAONE/) numbers and [G-One Numbers](https://www.spoj.com/problems/GONE/) Any number is LUCIFER NUMBER if the Difference between Sum of digits at even location and Sum of digits at odd location is prime number .. For eg... for 20314210 is lucifer number digits at odd location 0,2,1,0 digits at even location 1,4,3,2 diff = (1+4+3+2)-(0+2+1+0)=10-3 = 7 ..... a prime number. Lucifer has access to a Warehouse which has lots of weapons .. He wants to know in how many ways can he kill him. Can you help him?

Input Format

First line will have a number 't' denoting the number of test cases. each of the following t lines will have 2 numbers 'a' , 'b'

Output Format

Print single number per test case, depicting the count of Lucifer numbers in the range a,b inclusive.