#include <iostream>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <vector>
#include <valarray>
#include <array>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <cmath>
#include <complex>
#include <random>

using namespace std;
using ll = long long;
using ull = unsigned long long;
constexpr int TEN(int n) {return (n==0)?1:10*TEN(n-1);}

const int N = 210;

struct MT {
    bool g[N][N];
    int mt[N];
};

vector<int> res;
bool used[N][2];
bool dfs(const MT &mt, int p, int b) {
    used[p][b] = true;
    if (mt.mt[p] == -1 and b == 1) {
        res.push_back(p);
        return true;
    }
    if (b == 0) {
        for (int q = 0; q < N; q++) {
            if (mt.g[p][q] == false) continue;
            if (used[q][1-b]) continue;
            if (dfs(mt, q, 1-b)) {
                res.push_back(p);
                return true;
            }
        }   
    } else {
        int q = mt.mt[p];
        if (!used[q][1-b] and dfs(mt, q, 1-b)) {
            res.push_back(p);
            return true;
        }
    }
    return false;
}

vector<int> findMwalk(const MT &mt) {
    /*
     M?¢????????????£?????????????????????
     ??????????????£?????????vector
     */
    res.clear();
    memset(used, 0, sizeof(used));
    for (int i = 0; i < N; i++) {
        if (mt.mt[i] != -1 or used[i][0]) continue;
        if (dfs(mt, i, 0)) return res;
    }
    return vector<int>();
}


bool maxmt(MT &mt) {
    int ty[N] = {}; // ?????????????????? -1:??¶??? 0:?????\?¶? 1:?\????
    int rt[N]; // ??¨??§??????
    int gr[N]; // ??¶????????´???, ??????????±?????????¶????????????
    int nw[N]; // ?¬???????????????????????????? (?????\?¶??????´???)
    fill_n(nw, N, -1);
    fill_n(rt, N, -1);
    fill_n(gr, N, -1);
    /*
     ??¨??¨?????¶???u???????????????(u, mt[u], nw[mt[u]], mt[nw[mt[u]]], ...)??????M-?¢???????????????????
     ?????????????????????????????????????????°????????????
     */
    using P = pair<int, int>;

    queue<int> q; // ??¶?????¨???queue
    for (int i = 0; i < N; i++) {
        if (mt.mt[i] == -1) {
            rt[i] = gr[i] = i; // ??¨??§??????, ??????
            ty[i] = -1;
            q.push(i);
        }
    }

    // u????????????????????????
    auto get_path = [&](int u) {
        vector<int> v;
        while (rt[u] != u) {
            v.push_back(u);
            v.push_back(mt.mt[u]);
            u = nw[mt.mt[u]];
        }
        v.push_back(u);
        return v;
    };
    while (q.size()) {
        int a = q.front(); q.pop();
        for (int b = 0; b < N; b++) {
            if (!mt.g[a][b] or ty[b] == 1) continue; // ???????????? or ?\???????????????????
            if (ty[b] == -1 and gr[a] == gr[b]) continue; // ??¶?????§???grop????????????????????????
            if (ty[b] == 0) {
                // ?????????
                int c = mt.mt[b];
                nw[b] = a; nw[c] = -1;
                rt[b] = rt[c] = rt[a];
                gr[b] = b; gr[c] = c;
                ty[b] = 1; ty[c] = -1;
                q.push(c);
                continue;
            }
            if (rt[a] != rt[b]) {
                // ?????????????????????
                for (int c: {a, b}) {
                    auto v = get_path(c);
                    int m = (int)v.size();
                    assert(m % 2 == 1);
                    for (int i = 1; i < m; i += 2) {
                        mt.mt[v[i]] = v[i+1];
                        mt.mt[v[i+1]] = v[i];
                    }
                }
                mt.mt[a] = b;
                mt.mt[b] = a;
                return true;
            }
            // ??°???
            auto v1 = get_path(a);
            auto v2 = get_path(b);
            reverse(v1.begin(), v1.end());
            reverse(v2.begin(), v2.end());
            assert(v1[0] == v2[0]);
            int m = min(v1.size(), v2.size()), lca;
            for (int i = 1; i <= m; i++) {
                if (i == m or v1[i] != v2[i]) {
                    lca = gr[v1[i-1]]; // LCA
                    break;
                }
            }
            bool used[N] = {};
            fill_n(used, N, false);
            for (int c: {a, b}) {
                auto v = get_path(c);
                int m = (int)v.size();
                for (int i = 0; gr[v[i]] != lca; i += 2) {
                    used[gr[v[i]]] = used[gr[v[i+1]]] = true;
                    if (ty[v[i+1]] == 1) {
                        ty[v[i+1]] = -1;
                        q.push(v[i+1]);
                    }
                    if (i) nw[v[i]] = v[i-1];
                }
            }
            if (gr[a] != lca) nw[a] = b;
            if (gr[b] != lca) nw[b] = a;
            for (int i = 0; i < N; i++) {
                if (ty[i] and used[gr[i]]) {
                    gr[i] = lca;
                }
            }
        }
    }
    return false;
}

MT first;
int solve() {
    int co = 0;
    while (maxmt(first)) {
        co++;
    }
    return co;
}


int main() {
    memset(first.g, 0, sizeof(first.g));
    memset(first.mt, -1, sizeof(first.mt));
    int n, m;
    scanf("%d %d", &n, &m); n--;
    bool one[N] = {};
    for (int i = 0; i < m; i++) {
        int a, b;
        scanf("%d %d", &a, &b);
        if (a > b) swap(a, b);
        if (a == 1) {
            one[b-2] = true;
        } else {
            a -= 2; b -= 2;
            first.g[a][b] = first.g[b][a] = true;
        }
    }
    solve();
    for (int i = 0; i < n; i++) {
        if (first.mt[i] == -1) {
            printf("No\n");
            return 0;
        }
    }
    for (int i = 0; i < n; i++) {
        if (!one[i]) continue;
        first.g[i][n] = first.g[n][i] = true;
    }
    auto v = findMwalk(first);
    if (v.size() == 0) {
        printf("No\n");
    } else {
        printf("Yes\n");
    }
    return 0;
}

Measured memory_bytes: 3276