#include <bits/stdc++.h>
// #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int,int> PII;

#define REP(i,n) for(int i=0;i<(n);++i)
#define FOR(i,a,b) for (int i=(a); i<(b); ++i)
#define FORD(i,a,b) for (int i=(a)-1; i>=(b); --i)

#define pb push_back
#define mp make_pair
#define st first
#define nd second

namespace bcc {

  const int MAXN = 1000005;

  struct Edge{ // W momencie rozpoczęcia algorytmu musi być bcc = -1 i bridge = 0
      Edge* rev;
      int dest;
      int bcc;        //OUT: Numer komponentu
      bool bridge;    //OUT: Czy most                         /*M*/
      Edge(int v) : dest(v), bcc(-1) {
          bridge = false;                                     /*M*/
      };
  };

  int N;                  //IN: Liczba wierzchołków
  list<Edge>  adj[MAXN];  //IN: Listy sąsiedztwa
  int  visit[MAXN];
  bool  artp[MAXN];  //OUT: True, jeśli dany wierzchołek jest p.art. /*A*/
  int      bcc_num;  //OUT: Liczba komponentów                /*D*/
  int    low[MAXN];                                           /*L*/

  stack<Edge*> _stack;                                        /*D*/
  int        _dfsTime;
  int bccDFS(int v, bool root = false) {
      int lo = visit[v] = ++_dfsTime;
      for (auto it = adj[v].begin(); it != adj[v].end(); ++it) {
          if(it -> bcc != -1) continue;
          _stack.push(&*it);                                  /*D*/
          it->rev->bcc = -2;
          if(!visit[it->dest]) {
              int ulo = bccDFS(it->dest);
              lo = min(ulo, lo);
              it->bridge = it->rev->bridge = (ulo > visit[v]);/*M*/
              if(ulo >= visit[v]) {                           /*AD*/
                  artp[v] = !root; root = false;              /*A*/
                  Edge* edge;                                 /*D*/
                  do {
                      edge = _stack.top();                    /*D*/
                      _stack.pop();                           /*D*/
                      edge->bcc = edge->rev->bcc = bcc_num;   /*D*/
                  } while(edge != &*it);                      /*D*/
                  ++bcc_num;                                  /*D*/
              }                                               /*AD*/
          } else lo = min(lo, visit[it->dest]);
      }
      low[v] = lo;                                            /*L*/
      return lo;
  }

  int components = 0;
  void computeBCC(){
      fill(artp, artp+N, false);                              /*A*/
      fill(visit, visit+N, false);
      _dfsTime = 1;
      bcc_num = 0;                                            /*D*/
      REP(i,N) if(adj[i].size() && !visit[i]) {
        bccDFS(i, true);
        ++components;
      }
  }
};

const int MOD = 1000000007;

int main() {
  // ios_base::sync_with_stdio(0);

  int N, M;
  scanf("%d%d", &N, &M);
  bcc::N = N;
  REP(i,M) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a, --b;
    bcc::adj[a].pb(bcc::Edge(b));
    bcc::adj[b].pb(bcc::Edge(a));
    bcc::adj[a].back().rev = &bcc::adj[b].back();
    bcc::adj[b].back().rev = &bcc::adj[a].back();
  }

  bool ok = true;
  REP(i,N) if (bcc::adj[i].size() % 2) ok = false;
  bcc::computeBCC();
  if (bcc::components > 3) ok = false;
  int needed = 3 - bcc::bcc_num;
  map<int,int> X;
  REP(i,N) {
    map<int,int> tmp;
    for (auto e: bcc::adj[i]) ++tmp[e.bcc];
    for (auto p: tmp) if (p.nd >= 6) needed -= 2;
    else if (p.nd == 4) ++X[p.st];
  }
  for (auto p: X) if (p.nd > 2) needed -= 2;
  else needed--;

  ok = ok && needed <= 0;
  printf(ok ? "Yes\n" : "No\n");
}


Measured memory_bytes: 37248