{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE RankNTypes #-}
import qualified Data.ByteString.Lazy.Char8 as B
import Data.Maybe
-- import Data.List
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VUM
import Control.Monad
import Control.Monad.ST
-- import Debug.Trace
-- trace _ = id

solve :: Int -> Int -> [(Int,Int)] -> String
solve n m lstAB | V.length oddV > 0 = "No"
                | V.length six > 0 = "Yes"
                | V.length four >= 3 = "Yes"
                | V.length four <= 1 = "No"
                | null chk = "No"
                | otherwise = "Yes"
  where
  nbr = V.create $ do
    vec <- VM.replicate (n+1) []
    forM_ lstAB $ \(a,b) -> do
      VM.modify vec (a :) b
      VM.modify vec (b :) a
    return vec

  deg = V.map length nbr
  oddV = V.filter odd deg
  six = V.filter (== 6) deg
  four = V.filter (== 4) deg
  [p1, p2] = V.toList four
  qs = nbr V.! p1
  rs = map (follow p1) qs
  chk = filter (== p1) rs

  follow p r | r == p1 = p1
             | r == p2 = p2
             | otherwise = follow r s
    where [s] = filter (/= p) (nbr V.! r)

readBInt :: B.ByteString -> Int
readBInt = fst . fromJust . B.readInt

tmain :: B.ByteString -> String
tmain cont =
  let remLines0 = map B.words (B.lines cont)
      [bs_n,bs_m]:remLines1 = remLines0
      n = readBInt bs_n
      m = readBInt bs_m
      lstAB = map (\[x1,x2] -> (readBInt x1,readBInt x2)) remLines1
  in solve n m lstAB

outAnswer :: String -> IO ()
outAnswer = putStrLn

main :: IO ()
main = outAnswer . tmain =<< B.getContents
