690_C1. Brain Network (easy)
One particularly well-known fact about zombies is that they move and think terribly slowly. While we still don't know why their movements are so sluggish, the problem of laggy thinking has been recently resolved. It turns out that the reason is not (as previously suspected) any kind of brain defect – it's the opposite! Independent researchers confirmed that the nervous system of a zombie is highly complicated – it consists of n brains (much like a cow has several stomachs). They are interconnected by brain connectors, which are veins capable of transmitting thoughts between brains. There are two important properties such a brain network should have to function properly: 

  1. It should be possible to exchange thoughts between any two pairs of brains (perhaps indirectly, through other brains). 
  2. There should be no redundant brain connectors, that is, removing any brain connector would make property 1 false. 



If both properties are satisfied, we say that the nervous system is valid. Unfortunately (?), if the system is not valid, the zombie stops thinking and becomes (even more) dead. Your task is to analyze a given nervous system of a zombie and find out whether it is valid.

Input

The first line of the input contains two space-separated integers n and m (1 ≤ n, m ≤ 1000) denoting the number of brains (which are conveniently numbered from 1 to n) and the number of brain connectors in the nervous system, respectively. In the next m lines, descriptions of brain connectors follow. Every connector is given as a pair of brains a b it connects (1 ≤ a, b ≤ n, a ≠ b).

Output

The output consists of one line, containing either yes or no depending on whether the nervous system is valid.

Examples

Input

4 4
1 2
2 3
3 1
4 1


Output

no


Input

6 5
1 2
2 3
3 4
4 5
3 6


Output

yes
```python
import sys
sys.setrecursionlimit(1000000)
def dfs(v, pr):
    global used
    global p
    global f
    if not f:
        return None
    if used[v]:
        f = False
    used[v] = True
    for i in range(len(p[v])):
        if p[v][i] != pr:
            dfs(p[v][i], v)
n, m = map(int, input().split())
p = []
for i in range(n):
    p.append([])
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    p[a].append(b)
    p[b].append(a)
used = [False] * n
f = True
for i in range(n):
    if i != 0 and not used[i]:
        f = False
        break
    if not used[i]:
        dfs(i, -1)
if f:
    print('yes')
else:
    print('no')

        

```