The prime , can be written as the sum of six consecutive primes:
This is the longest sum of consecutive primes that adds to a prime below one-hundred.
The longest sum of consecutive primes below one-thousand that adds to a prime, contains terms, and is equal to .
Which prime, , can be written as the sum of the most consecutive primes? Note: You have to print prime as well as the length of consecutive chain whose sum is prime. If such primes are more than 1, print the least.
The first line contains an integer , i.e., number of test cases.
Next lines will contain an integer .
Print the values corresponding to each test case in a new line.