In the town of Binaryvile, located in Argentina, there was great anticipation as Lionel Messi, the world champion football player, was scheduled to visit and meet people individually. According to a survey, a large number of people have expressed their interest to meet with Messi one-on-one. However, due to the high number of people, it has become challenging for Messi to meet everyone individually. To ensure fairness, a task has been assigned, and only those who successfully complete it will have the opportunity to meet Messi. As you eagerly await your turn, you understand that solving the task is crucial for meeting your idol. It was an exciting and special opportunity for those who could prove their abilities and have a personal encounter with the famous football star.
You will be given queries, for each query you will be given two integer and Your task is to find the sum of the number of ones in the binary representation of each number within the range and determine whether the resulting sum is a prime number or not.
The first line of input data contains a single integer — indicating the number of queries.
The only line of the each query contains two integers and separated by space — indicating range of numbers.
Print a single line for each query — “Prime” if the sum of the number of ones in the binary representation of each number within the range is a prime or “Not Prime” otherwise.
3 1 5 5 10 12 18
Prime Not Prime Prime
In the first testcase,
Summation of ones in range is Now, is a prime number.