#yuki583 import sys def dfs(u): if flg[u]==1: return 0 flg[u]=1 for i in xrange(n): if g[u][i]==1: dfs(i) n,m=map(int,raw_input().split()) g=[[0]*n for i in xrange(n)] flg={} for i in xrange(m): a,b=map(int,raw_input().split()) g[a][b]+=1 g[b][a]+=1 flg[a]=0 flg[b]=0 dfs(a) for val in flg.values(): if val==0: print 'NO' sys.exit() cnt=0 for i in xrange(n): if g[i].count(1)%2==1: cnt+=1 if cnt>2: print 'NO' sys.exit() print 'YES'