#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<long long> vll;
typedef pair<int,int> pint;
typedef pair<long long, long long> pll;

#define MP make_pair
#define PB push_back
#define ALL(s) (s).begin(),(s).end()
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P) 
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P) 
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P) 
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P) 
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s; }



long long mod(long long a, long long m) {
    return (a % m + m) % m;
}
inline long long inv(long long a, long long m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a/b;
        a -= t*b; swap(a, b);
        u -= t*v; swap(u, v);
    }
    return mod(u, m);
}

template<class T> struct Matrix {
    vector<vector<T> > val;
    Matrix(int n = 1, int m = 1) {val.clear(); val.resize(n, vector<T>(m));}
    Matrix(int n, int m, T x) {val.clear(); val.resize(n, vector<T>(m, x));}
    void init(int n, int m, T x = 0) {val.clear(); val.resize(n, vector<T>(m, x));}
    void resize(int n, int m, T x = 0) {val.resize(n); for (int i = 0; i < n; ++i) val[i].resize(m, x);}
    int size() {return val.size();}
    inline vector<T>& operator [] (int i) {return val[i];}
    friend ostream& operator << (ostream& s, Matrix<T> M) {s << endl; 
        for (int i = 0; i < M.val.size(); ++i) s << M[i] << endl; return s;}
};

template<class T> T det(Matrix<T> A, int p) {
	int rank = 0;
    for (int i = 0; i < A.size(); ++i) 
        for (int j = 0; j < A[0].size(); ++j)
            A[i][j] = mod(A[i][j], p);
    
	T res = 1;
	for (int i = 0; i < A[0].size(); ++i) {
		int pivot = rank;
        bool exist = false;
        for (int j = rank; j < A.size(); ++j) {
            if (A[j][i] != 0) {
                pivot = j;
                exist = true;
                break;
            }
        }
		if (exist) {
			swap(A[pivot], A[rank]);
			res = mod(res * A[rank][i], p);
            T ainv = inv(A[rank][i], p);
			vector<T> tmp(A[0].size());
            for (int j = 0; j < A[0].size(); ++j) {
                tmp[j] = mod(A[rank][j] * ainv, p);
            }
			for (int j = 0; j < A.size(); ++j) {
				if (j != rank && A[j][i] != 0) {
                    T fac = A[j][i];
					for (int k = 0; k < A[0].size(); ++k) {
                        A[j][k] = mod(A[j][k] - tmp[k] * fac, p);
                    }
				}
			}
			++rank;
        }
        else return 0;
	}

    return res;
};

unsigned int ran() {
    static unsigned int tx = 123456789, ty=362436069, tz=521288629, tw=88675123;
    int tt = (tx^(tx<<11));
    tx = ty; ty = tz; tz = tw;
    return ( tw=(tw^(tw>>19))^(tt^(tt>>8)) );
}  

int next(int minv, int maxv) {
    return ran() % (maxv - minv + 1) + minv;
}



const long long MOD = 1000000007;

int n, m, a, b;
bool G[510][510];

bool solve() {
	memset(G, 0, sizeof(G));
	for (int i = 0; i < m; ++i) {
		cin >> a >> b; --a; --b;
		G[a][b] = G[b][a] = 1;
	}
	for (int iter = 0; iter < 1; ++iter) {
		Matrix<long long> A(n, n, 0);
		for (int i = 0; i < n; ++i) for (int j = i+1; j < n; ++j) {
			if (G[i][j] == 0) continue;
			long long num = next(1, MOD-1);
			A[i][j] = num;
			if (i == 0) A[j][i] = next(1, MOD-1);
			else A[j][i] = -num;
		}
		long long d = det(A, MOD);

		//COUT(A); COUT(d);

		if (d != 0) return true;
	}
	return false;
}

int main() {
    //freopen( "/Users/macuser/Dropbox/Contest/input.in", "r", stdin );
    
	//Matrix<long long> A(2, 2);
	//A[0][0] = 3; A[0][1] = 2;
	//A[1][0] = 2; A[1][1] = 6;
 //   
	//COUT(A);
	//COUT(det(A, MOD));

	while (cin >> n >> m) {
		if (solve()) puts("Yes");
		else puts("No");
	}
    return 0;
}


Measured memory_bytes: 1864