Euro Crisis

As you might know the current exchange rate between Swiss francs and Euros is very low, which is why many Swiss go to Germany to buy products with the cheaper Euro. As Stofl's family sometimes encounters some money problems, they are planning a trip to Germany as well. Besides Stofl himself also his parents will come along (so three mice in total).

When importing goods from the EU into Switzerland there is a duty-free limit of 300 Swiss francs per mouse. However, a single good cannot be split up over multiple mice. So for instance if three mice buy four products for 200 Swiss francs each, they cannot import it duty-freely, even though the total value (here 800 Swiss francs) would be less than their accumulated duty-free limit of 900 Swiss francs.

Task

Given the prices of the products (in Swiss francs) Stofl's family buys, determine whether they can distribute the goods to the three family members in such a way that they can import the entire shopping duty-freely (i.e. nobody gets more than 300 Swiss francs in value). To simplify the calulcation you can assume that all the products cost a round Swiss franc-amount (no rappen).

Input

The first line of the input contains a single integer $n$ ($1\leq n\leq 100$), the number of products Stofl's family buys. Each of the following $n$ lines contains a single integer $p_i$ ($1\leq p_i\leq 1000$), the price of the $i$-th product in Swiss francs.

Output

Output the word Yes if it is possible to import all the goods duty-freely, and No otherwise.

Limits

  • For testcases worth 40% of the points, $n\leq 10$ holds.
  • For testcases worth 50% of the points, $n\leq 15$ holds.

Example

InputOutput

4
198
200
199
200

No

InputOutput

6
150
200
100
140
300
5

Yes

Explanation

For the first example no matter how the products are split up between the three mice, at least one will always get more than $300$ Swiss francs in value.

For the second example a valid possibility would be the following:

  • The first mouse takes goods $1, 4$ and $6$ to get a total value of $150+140+5 = 295$ Swiss francs.
  • The second mouse takes goods $2$ and $3$ to get a total value of $200+100 = 300$ Swiss francs.
  • The third mouse takes good $5$ to get a total value of $300$ Swiss francs.

Submission