#include <iostream>
#include <vector>
#include <cassert>
#include <random>
using namespace std;
using ll = long long;
constexpr int MOD = 32749;
template <typename T>
T extgcd(const T a, const T b, T& x, T& y)  // ax+by=gcd(a,b)
{
    T d = a;
    x = 1;
    y = 0;
    if (b != 0) {
        d = extgcd(b, a % b, y, x);
        y -= (a / b) * x;
    }
    if (d < 0) {
        x = -x;
        y = -y;
        d = -d;
    }
    return d;
}
template <typename T>
inline T inverse(const T a)
{
    T x, y;
    const T g = extgcd(a, MOD, x, y);
    assert(g == 1);
    return (MOD + (x % MOD)) % MOD;
}
struct ModNum {
    ModNum(const int v) : v(v) {}
    bool zero() const { return v == 0; }
    ModNum operator-() const { return ModNum((MOD - v) % MOD); }
    ModNum operator+(const ModNum& n) const { return ModNum((v + n.v) % MOD); }
    ModNum operator*(const ModNum& n) const { return ModNum(v * n.v % MOD); }
    ModNum operator/(const ModNum& n) const { return ModNum(v * inverse(n.v) % MOD); }
    ModNum& operator+=(const ModNum& n)
    {
        (v += n.v) %= MOD;
        return *this;
    }
    ModNum& operator-=(const ModNum& n)
    {
        (v += MOD - n.v) %= MOD;
        return *this;
    }
    int v;
};

template <typename T>
struct Matrix {
    Matrix(const int n) : Matrix{n, n} {}
    Matrix(const int r, const int c) : R{r}, C{c}, table(r, vector<T>(c, static_cast<T>(0))) {}
    vector<T>& operator[](const int n) { return table[n]; }
    const vector<T>& operator[](const int n) const { return table[n]; }
    Matrix operator*(const Matrix& mat) const
    {
        assert(C == mat.R);
        Matrix result(R, mat.C);
        for (int i = 0; i < R; i++) {
            for (int j = 0; j < mat.C; j++) {
                T sum = 0;
                for (int k = 0; k < C; k++) {
                    sum += table[i][k] * mat[k][j];
                }
                result[i][j] = sum;
            }
        }
        return result;
    }
    static Matrix Unit(const int n)
    {
        Matrix<T> ans(n, n);
        for (int i = 0; i < n; i++) {
            ans[i][i] = 1;
        }
        return ans;
    }
    int R;
    int C;
    vector<vector<T>> table;
};

template <typename T>
int getRank(Matrix<T> mat)
{
    int dim = 0;
    int pos = 0;
    for (int i = 0; i < mat.C and pos < mat.R; i++, pos++) {
        if (mat[pos][i].zero()) {
            int piv = -1;
            for (int k = pos + 1; k < mat.R; k++) {
                if (not mat[k][i].zero()) {
                    piv = k;
                    break;
                }
            }
            if (piv != -1) {
                swap(mat[pos], mat[piv]);
            } else {
                pos--;
                continue;
            }
        }
        for (int j = 0; j < mat.R; j++) {
            if (pos == j) {
                continue;
            }
            if (not mat[j][i].zero()) {
                const T p = mat[j][i] / mat[pos][i];
                for (int k = 0; k < mat.C; k++) {
                    mat[j][k] -= mat[pos][k] * p;
                }
            }
        }
        dim++;
    }
    return dim;
}

int main()
{
    int N, M;
    cin >> N >> M;
    vector<int> e;
    Matrix<ModNum> tutte(N, N);
    mt19937 mt{random_device{}()};
    uniform_int_distribution<int> dist{1, MOD - 1};
    for (int i = 0; i < M; i++) {
        int u, v;
        cin >> u >> v;
        u--, v--;
        if (u == 0) {
            e.push_back(v);
        } else if (v == 0) {
            e.push_back(u);
        } else {
            const ModNum val = ModNum(dist(mt));
            tutte[u][v] = val;
            tutte[v][u] = -val;
        }
    }
    if (getRank(tutte) != N - 1) {
        cout << "No" << endl;
        return 0;
    }
    for (const int to : e) {
        const ModNum val = ModNum(dist(mt));
        tutte[0][to] = val;
        tutte[to][0] = -val;
    }
    for (const int to : e) {
        tutte[to][0] = tutte[0][to];
        const int rk = getRank(tutte);
        if (rk == N) {
            cout << "Yes" << endl;
            return 0;
        }
        tutte[to][0] = -tutte[0][to];
    }
    cout << "No" << endl;
    return 0;
}



Measured memory_bytes: 3384