#include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)< pii; typedef vector vi; typedef vector vll; const int N_MAX = 20001; int N, M, C[N_MAX], vis[N_MAX][1 << 5], ok = 0; vi G[N_MAX]; void dfs(int u, int S){ if(vis[u][S]++)return; if(S == (1 << 5) - 1){ each(v, G[u])if(v == 0)ok = 1; return; } each(v, G[u]) if(!(C[v]&S)) dfs(v, S | C[v]); } int main(){ cin >> N >> M; rep(i, M){ int A, B; scanf("%d%d", &A, &B); G[--A].push_back(--B); G[B].push_back(A); } rep(iter, 250){ MEM(vis, 0); rep(i, N)C[i] = 1<<(rand()%5); dfs(0, C[0]); } puts(ok ? "YES" : "NO"); }