You are given an array
A=(A1,A2,…,An)A = (A_1, A_2, \dots, A_n)A=(A1,A2,…,An) of
nnn positive integers.
You can do the following operation any number of times (possibly, zero) on
AAA:
-
Choose two distinct indices i,ji, ji,j (1≤i,j≤n1 \leq i, j \leq n1≤i,j≤n), then let Ai=Ai+1,Aj=Aj−1A_i = A_i + 1, A_j = A_j - 1Ai=Ai+1,Aj=Aj−1.
Determine whether you can make all the integers in the array
AAA prime numbers by applying the operations.
Recall that a prime number is a positive integer greater than
111 that is not a product of two smaller positive integers.