| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 256 MB | 145 | 70 | 57 | 50.893% |
A sequence $S$ of positive integers is a composite sequence if and only if there is a non-empty subsequence $T$ of $S$ such that the sum of all integers in $T$ is a composite number.
Given $S,ドル your task is to check whether $S$ is a composite sequence.
Note that 1ドル$ is not a composite number.
Recall that $T$ is a subsequence of $S$ if and only if we can obtain $T$ by removing some elements of $S$ (possibly none or all).
The first line contains a single integer $n$ (1ドル \le n \le 10^5$), the size of $S$.
The second line contains $n$ integers $S_1, S_2, \ldots, S_n$: the elements of $S$ (1ドル \le S_i \le 10^9$).
If $S$ is a composite sequence, output "Yes". Otherwise, output "No".
2 5 7
Yes
1 97
No