Fibonacci Prime Numbers
Very hard
Execution time limit is 2 seconds
Runtime memory usage limit is 64 megabytes
In life, not everything is straightforward, especially when it comes to numbers.
You are provided with a set of numbers. For each number, your task is to determine if the Fibonacci number at that index is a prime number.
Input
The first line of the input contains a single integer, (1 \leq T \leq 5000), representing the number of indices for Fibonacci sequence numbers. Following this, there are (T) natural numbers, each not exceeding (10^{18}).
Output
For each index, output "YES" on a new line if the Fibonacci number at that index is prime, and "NO" otherwise.
Examples
Input #1
Answer #1
Submissions 990
Acceptance rate 1%