This page is still under construction.

Parts of this page are still being built. What you see may change.

Composite Sequence

Time limit1sMemory limit256 MB

Summary
Decide whether some non-empty subsequence of the given positive integers sums to a composite number.
Level

Medium7 of 10

Topics
Math, Number theory, Greedy, Brute force
Solved
No attempts yet

Problem

A sequence SS of positive integers is a composite sequence if and only if there is a non-empty subsequence TT of SS such that the sum of all integers in TT is a composite number.

Given SS, determine whether SS is a composite sequence.

11 is not a composite number.

TT is a subsequence of SS if and only if we can obtain TT by removing some elements of SS (possibly none or all).

Input

The first line contains a single integer nn (1≤n≤1051 \le n \le 10^5), the size of SS.

The second line contains nn integers S1,S2,…,SnS_1, S_2, \ldots, S_n: the elements of SS (1≤Si≤1091 \le S_i \le 10^9).

Output

If SS is a composite sequence, output Yes. Otherwise, output No.

Examples2

  1. Example 1

    Input
    2
    5 7
    
    Expected output
    Yes
    
  2. Example 2

    Input
    1
    97
    
    Expected output
    No