Prime-Balanced Indices
An index \(i\) is prime-balanced when both the sum of elements strictly before \(i\) and the sum of elements strictly after \(i\) are prime. List all such indices using zero-based indexing.
Input
The first line contains \(N\). The second line contains \(N\) integers \(A_i\).
The input satisfies:
- \(1 \le N \le 1000\)
- \(0 \le A_i \le 1000\)
Output
Print all prime-balanced indices in increasing order, separated by single spaces. Print an empty line if none exist.
Example
Input
1
2
Comments