class UnionFind
	def initialize(n); @p = *0...n; @r = [0] * n; end; def find(x); @p[x] == x ? x : @p[x] = find(@p[x]); end; def unite(x, y); x = find(x); y = find(y); return if x == y; if @r[x] < @r[y]; @p[x] = y; else; @p[y] = x; @r[x] += 1 if @r[x] == @r[y]; end; nil; end; def same(x, y); find(x) == find(y); end

	def par
		@p.map{|i|find(i)}
	end
end


(n,m),*ab=$<.map{|s|s.split.map &:to_i}
v=Array.new(n){[]}
uf=UnionFind.new(n)
ab.each{|a,b|
a-=1
b-=1
v[a]<<b
v[b]<<a
uf.unite(a,b)
}
v.delete_if{|s|s.size==0}
if v.any?{|s|s.size%2==1}
	puts "No"
else
	s=v.map{|x|x.size/2-1}.reduce(:+)
	if s>=2
		puts "Yes"
	else
		k=(uf.par.each_with_index.select{|p,i|p!=i}.map{|p,i|p}).uniq.size
		if k+s==3
			puts "Yes"
		else
			puts "No"
		end
	end
end