n,m=gets.split.map &:to_i
a = Array.new(n+1).map{|e|[]}
m.times do
    g0,g1 = gets.split.map &:to_i
    a[g0] << g1
    a[g1] << g0
end
c=0
root = []
target = -1
target_before = -1
while true do
    #target
    if target == -1
        if root != []
            break
        end
        (n+1).times do |i|
            if a[i] != []
                target = a[i].pop
                target_before = i
                root << i
                break
            end
        end
    else
        a[target].delete(target_before)
        target_before = target
        target = a[target].pop
    end

    if root == []
        break
    end
    
    if root.include?(target)
        g = root.index(target)
        root = root[0..g]
        c+=1
        if g==0
            a[root[-1]].delete(target_before)
            target = -1
            root.pop
        else
            a[target].delete(target_before)
            target_before = target
            target = a[g-1].pop
        end
    end
end
p c
if c==3 && a.all?([])
    puts :Yes
else
    puts :No
end

    

    