#include <bits/stdc++.h>
using namespace std;
template <class P, class Q>
void smin(P &a, Q b) {
  if (b < a) a = b;
}
template <class P, class Q>
void smax(P &a, Q b) {
  if (b > a) a = b;
}
template <class P, class Q>
bool in(const P &a, const Q &b) {
  return a.find(b) != a.end();
}
const int MAXN = 100;
int n, g[MAXN][MAXN];
bool mark[MAXN];
int cnt(int x) {
  int tot = 0;
  for (int i = (0); i < int(n); ++i)
    if (g[x][i]) tot++;
  return tot;
}
void dfs(int pos) {
  mark[pos] = true;
  int best = -1, vert = -1;
  for (int i = (0); i < int(n); ++i)
    if (!mark[i] && g[pos][i]) {
      if (best == -1 || cnt(i) < best) {
        best = cnt(i);
        vert = i;
      }
    }
  if (vert != -1) return dfs(vert);
}
int main() {
  int m;
  cin >> n >> m;
  while (m--) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    if (a != b) g[a][b] = g[b][a] = true;
  }
  for (int cur = (0); cur < int(n); ++cur) {
    memset(mark, 0, sizeof mark);
    dfs(cur);
    bool ok = true;
    for (int i = (0); i < int(n); ++i)
      if (!mark[i]) ok = false;
    if (ok) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
