#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const int INF = 1 << 28;
const ll MOD = 1000000007;
template <class T>
bool chmax(T &a, const T &b) {
    return (a < b) ? (a = b, 1) : 0;
}
template <class T>
bool chmin(T &a, const T &b) {
    return (b < a) ? (a = b, 1) : 0;
}

template <typename T, bool directed>
struct Dinic {
    struct edge {
        int to;
        T cap;   // capacity of the edge
        int rev; // reverse flow for the edge
        edge() {}
        edge(int to_, T cap_, int rev_) : to(to_), cap(cap_), rev(rev_) {}
    };
    T inf;
    vector<vector<edge>> G;
    vector<int> level, iter;
    Dinic(int n, T inf_) : inf(inf_), G(n), level(n), iter(n) {}

    void addEdge(int from, int to, int cap) {
        G[from].emplace_back(to, cap, G[to].size());
        G[to].emplace_back(from, directed ? 0 : cap, G[from].size() - 1);
    }
    void bfs(int s) {
        fill(level.begin(), level.end(), -1);
        queue<int> que;
        level[s] = 0;
        que.emplace(s);
        while (!que.empty()) {
            int v = que.front();
            que.pop();
            for (edge &e : G[v]) {
                if (e.cap > 0 && level[e.to] < 0) {
                    level[e.to] = level[v] + 1;
                    que.emplace(e.to);
                }
            }
        }
    }
    T dfs(int v, int t, T f) {
        if (v == t)
            return f;
        for (int i = iter[v]; i < int(G[v].size()); ++i) {
            edge &e = G[v][i];
            if (e.cap > 0 && level[v] < level[e.to]) {
                T d = dfs(e.to, t, min(f, e.cap));
                if (d == 0)
                    continue;
                e.cap -= d;
                G[e.to][e.rev].cap += d;
                return d;
            }
        }
        return 0;
    }
    T flow(int s, int t, T lim) {
        T fl = 0;
        while (true) {
            bfs(s);
            if (level[t] < 0 || lim == 0)
                break;
            fill(iter.begin(), iter.end(), 0);
            while (true) {
                T f = dfs(s, t, lim);
                if (f == 0)
                    break;
                fl += f;
                lim -= f;
            }
        }
        return fl;
    }
    T flow(int s, int t) { return flow(s, t, inf); }
};

int main() {
    int n, m;
    cin >> n >> m;
    Dinic<int, false> dinic(n, INF);
    vi edges(n, 0);
    for (int i = 0; i < m; ++i) {
        int a, b;
        cin >> a >> b;
        edges[a - 1]++;
        edges[b - 1]++;
        dinic.addEdge(a - 1, b - 1, 1);
    }
    int six = 0;
    int four = 0;
    vi fours;
    for (int i = 0; i < n; ++i) {
        if (edges[i] >= 6)
            six++;
        else if (edges[i] >= 4) {
            four++;
            fours.push_back(i);
        }
        if (edges[i] % 2 == 1) {
            cout << "No"
                 << "\n";
            return 0;
        }
    }
    if (six >= 1 || four >= 3)
        cout << "Yes"
             << "\n";
    else if (four < 2) {
        cout << "No"
             << "\n";

    } else {
        int minCut = dinic.flow(fours[0], fours[1]);
        if (minCut == 2)
            cout << "Yes"
                 << "\n";
        else
            cout << "No"
                 << "\n";
    }
    return 0;
}

Measured memory_bytes: 8064