#include <bits/stdc++.h>
using namespace std;
int vis[25][25], adj[25][25], d[25], f[25];
bool cmp(int a, int b) {
  if (d[a] != d[b]) return d[a] < d[b];
  return a < b;
}
void gao(int u) {
  int i, v;
  for (i = 0; i < d[u]; ++i) {
    v = adj[u][i];
    if (!f[v]) {
      f[v] = 1;
      gao(v);
      return;
    }
  }
}
int main() {
  int n, m, u, v, i;
  scanf("%d%d", &n, &m);
  while (m--) {
    scanf("%d%d", &u, &v);
    if (u != v && !vis[u][v]) {
      vis[u][v] = vis[v][u] = 1;
      adj[u][d[u]++] = v;
      adj[v][d[v]++] = u;
    }
  }
  for (i = 1; i <= n; ++i) sort(adj[i], adj[i] + d[i], cmp);
  for (i = 1; i <= n; ++i) {
    memset(f, 0, sizeof(f));
    f[i] = 1;
    gao(i);
    int j, cnt = 0;
    for (j = 1; j <= n; ++j)
      if (f[j]) ++cnt;
    if (cnt == n) {
      printf("Yes\n");
      return 0;
    }
  }
  printf("No\n");
  return 0;
}
