Under construction

Still being built. Things may change

Date

Time limit2sMemory limit1024 MB

Summary
Given a meal cost k and Edward's bills, decide whether the sum still reaches k after removing the largest bill.
Level

Easy2 of 10

Topics
Array, Implementation
Solved
No attempts yet

Problem

Edward and Bella went on a date at the restaurant "Stefani's". This restaurant always serves the same set of dishes for a fixed price.

When Edward put down the money and went to powder his nose, Bella wondered whether he meant to pay for her too. When Edward wants to pay only for himself, he puts down a set of bills such that removing any single bill leaves a sum less than the cost of the meal. The opposite case means he also meant to pay for Bella.

Bella is bad at mental arithmetic, so she asks you to help her.

Input

The first line contains the cost of the meal kk (1≤k≤1091 \le k \le 10^9). The second line contains the number of bills nn (1≤n≤10001 \le n \le 1000) that Edward put down. The next line contains nn integers aia_i (1≤ai≤10001 \le a_i \le 1000), the values of the bills.

Output

Print "YES" if Edward is definitely going to pay for Bella, and "NO" otherwise.

Examples2

  1. Example 1

    Input
    169
    2
    200 100
    
    Expected output
    YES
    
  2. Example 2

    Input
    169
    1
    300
    
    Expected output
    NO