#include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define sar(a,n) cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl

using namespace std;

template<typename S,typename T>auto&operator<<(ostream&o,pair<S,T>p){return o<<"{"<<p.fi<<","<<p.se<<"}";}
template<typename T>auto&operator<<(ostream&o,set<T>s){for(auto&e:s)o<<e<<" ";return o;}
template<typename S,typename T,typename U>
auto&operator<<(ostream&o,priority_queue<S,T,U>q){while(!q.empty())o<<q.top()<<" ",q.pop();return o;}
template<typename K,typename T>auto&operator<<(ostream&o,map<K,T>m){for(auto&e:m)o<<e<<" ";return o;}
template<typename T>auto&operator<<(ostream&o,vector<T>v){for(auto&e:v)o<<e<<" ";return o;}
void ashow(){cout<<endl;}template<typename T,typename...A>void ashow(T t,A...a){cout<<t<<" ";ashow(a...);}

typedef pair<int,int> P;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef vector<P> vp;
typedef vector<double> vd;
typedef vector<string> vs;

const int MAX_N = 100005;

template <uint mod>
class ModInt {
private:
    uint v;
    static uint norm(const uint& x){ return x < mod ? x : x - mod; }
	static ModInt make(const uint& x){ ModInt m; return m.v = x, m; }
    static ModInt inv(const ModInt& x){ return make(inverse(x.v, mod)); }
    static uint inverse(int a, int m){
        int u[] = {a, 1, 0}, v[] = {m, 0, 1}, t;
        while(*v){
            t = *u / *v;
            swap(u[0] -= t * v[0], v[0]), swap(u[1] -= t * v[1], v[1]), swap(u[2] -= t * v[2], v[2]);
        }
        return (u[1] % m + m) % m;
    }

public:
    ModInt() : v{0}{}
    ModInt(const ll val) : v{norm(val % mod + mod)} {}
    ModInt(const ModInt<mod>& n) : v{n()} {}
	explicit operator bool() const noexcept { return v != 0; }
    bool operator!() const noexcept { return !static_cast<bool>(*this); }
    ModInt<mod>& operator=(const ModInt<mod>& n){ return v = n(), (*this); }
    ModInt<mod>& operator=(const ll val){ return v = norm(val % mod + mod), (*this); }
    ModInt<mod> operator+() const { return *this; }
    ModInt<mod> operator-() const { return v == 0 ? 0 : mod - v; }
    ModInt<mod> operator+(const ModInt<mod>& val) const { return make(norm(v + val())); }
    ModInt<mod> operator-(const ModInt<mod>& val) const { return make(norm(v + mod - val())); }
    ModInt<mod> operator*(const ModInt<mod>& val) const { return make((ll)v * val() % mod); }
    ModInt<mod> operator/(const ModInt<mod>& val) const { return *this * inv(val); }
    ModInt<mod>& operator+=(const ModInt<mod>& val){ return *this = *this + val; }
    ModInt<mod>& operator-=(const ModInt<mod>& val){ return *this = *this - val; }
    ModInt<mod>& operator*=(const ModInt<mod>& val){ return *this = *this * val; }
    ModInt<mod>& operator/=(const ModInt<mod>& val){ return *this = *this / val; }
    ModInt<mod> operator+(const ll val) const { return ModInt{v + val}; }
    ModInt<mod> operator-(const ll val) const { return ModInt{v - val}; }
    ModInt<mod> operator*(const ll val) const { return ModInt{(ll)v * (val % mod)}; }
    ModInt<mod> operator/(const ll val) const { return ModInt{(ll)v * inv(val)}; }
    ModInt<mod>& operator+=(const ll val){ return *this = *this + val; }
    ModInt<mod>& operator-=(const ll val){ return *this = *this - val; }
    ModInt<mod>& operator*=(const ll val){ return *this = *this * val; }
    ModInt<mod>& operator/=(const ll val){ return *this = *this / val; }
    bool operator==(const ModInt<mod>& val) const { return v == val.v; }
    bool operator!=(const ModInt<mod>& val) const { return !(*this == val); }
    bool operator==(const ll val) const { return v == norm(val % mod + mod); }
    bool operator!=(const ll val) const { return !(*this == val); }
    uint operator()() const { return v; }
    friend ModInt operator+(const ll val, const ModInt& n) { return n + val; }
    friend ModInt operator-(const ll val, const ModInt& n) { return ModInt{val - n()}; }
    friend ModInt operator*(const ll val, const ModInt& n) { return n * val; }
    friend ModInt operator/(const ll val, const ModInt& n) { return ModInt{val} / n; }
    friend bool operator==(const ll val, const ModInt& n) { return n == val; }
    friend bool operator!=(const ll val, const ModInt& n) { return !(val == n); }
    friend istream& operator>>(istream& is, ModInt& n){
        uint v;
        return is >> v, n = v, is;
    }
    friend ostream& operator<<(ostream& os, const ModInt& n){ return (os << n()); }
    friend ModInt power(ModInt x, ll n){
        ModInt ans = 1;
        while(n){
            if(n & 1) ans *= x;
            x *= x, n >>= 1;
        }
        return ans;
    }
};

template<typename T> class mat : public vector<vector<T> > {
private:
    int r, c;    //行,列
public:
    inline int row() const { return r; }
    inline int column() const { return c; }
    mat(const int n, const int m, T val = 0)
        : vector<vector<T> >(n, vector<T>(m, val)), r{n}, c{m}{}
    int rank(){
        mat<T> X(r, c);
        for(int i = 0; i < r; i++){
            for(int j = 0; j < c; j++){
                X[i][j] = (*this)[i][j];
            }
        }
        int res = 0;
        for(int i = 0; i < c; i++){
            if(res == r) return res;
            if(!X[res][i]){
                int pivot = res + 1;
                for(; pivot < r; pivot++){
                    if(X[pivot][i]){
                        swap(X[res], X[pivot]);
                        break;
                    }
                }
                if(pivot == r) continue;
            }
            const T p = (T)1 / X[res][i];
            for(int j = i + 1; j < c; j++){ X[res][j] *= p; }
            for(int j = res + 1; j < r; j++){
                if(!X[j][i]) continue;
                for(int k = i + 1; k < c; k++){
                    X[j][k] -= X[res][k] * X[j][i];
                }
            }
            res++;
        }
        return res;
    }
    bool det_zero() const {
        mat<T> X(r, c);
        for(int i = 0; i < r; i++){
            for(int j = 0; j < c; j++){
                X[i][j] = (*this)[i][j];
            }
        }
        for(int i = 0; i < c; i++){
            if(!X[i][i]){
                int pivot = i + 1;
                for(; pivot < r; pivot++){
                    if(X[pivot][i]){
                        swap(X[i], X[pivot]);
                        break;
                    }
                }
                if(pivot == r) return true;
            }
            const T p = (T)1 / X[i][i];
            for(int j = i + 1; j < c; j++){ X[i][j] *= p; }
            for(int j = i + 1; j < r; j++){
                if(!X[j][i]) continue;
                for(int k = i + 1; k < c; k++){
                    X[j][k] -= X[i][k] * X[j][i];
                }
            }
        }
        return false;
    }
};

class Matching {
private:
    int V;
    vector<pair<int, int> > es;
    vector<int> cnt;
    random_device rnd;
	mt19937 mt;
    uniform_int_distribution<> randval;
    static constexpr int LOOP = 3;
    static constexpr uint mod = 1000000007;

public:
    Matching(int node_size) : V(node_size), cnt(V+1, 0), mt(rnd()), randval(0, 5){}
    void add_edge(int u, int v){
        if(u > v) swap(u, v);
        es.push_back(make_pair(u, v));
    }
    bool perfect_matchching(){
        for(int i = 0; i < LOOP; i++){
            mat<ModInt<mod> > A(V, V);
            for(auto e : es){
                int r = randval(mt);
                if(e.first){
                    A[e.first][e.second] = r, A[e.second][e.first] = -r;
                }else{
                    A[e.first][e.second] = r;
                    A[e.second][e.first] = randval(mt);
                }
            }
            if(!A.det_zero()) return true;
        }
        return false;
    }
    int maximum_matchching(){
        for(int i = 0; i < LOOP; i++){
            mat<ModInt<mod> > A(V, V);
            for(auto e : es){
                int r = randval(mt);
                A[e.first][e.second] = r, A[e.second][e.first] = -r;
            }
            cnt[A.rank()]++;
        }
        return (int)(max_element(cnt.begin(), cnt.end()) - cnt.begin()) / 2;
    }
};

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,m;
    cin >> n >> m;
    Matching mc(n);
    rep(i,m){
        int a,b;
        cin >> a >> b;
        mc.add_edge(a-1,b-1);
    }
    if(mc.perfect_matchching()){
        cout << "Yes\n";
    }else{
        cout << "No\n";
    }
    return 0;
}



Measured memory_bytes: 3424