#include <bits/stdc++.h>
using namespace std;
bool visited[22];
bool h[22][22];
int c[30];
vector<int> V[30];
inline bool cmp(int x, int y) {
  if (c[x] != c[y]) return c[x] < c[y];
  return x < y;
}
void dfs(int x) {
  visited[x] = 1;
  for (int i = 0; i < V[x].size(); i++) {
    int u = V[x][i];
    if (!visited[u]) {
      dfs(u);
      return;
    }
  }
}
int main() {
  int n, m, x, y;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    if (x != y) {
      if (!h[x][y]) {
        c[x]++;
        c[y]++;
        V[x].push_back(y);
        V[y].push_back(x);
        h[x][y] = h[y][x] = 1;
      }
    }
  }
  for (int i = 1; i <= n; i++) sort(V[i].begin(), V[i].end(), cmp);
  for (int i = 1; i <= n; i++) {
    memset(visited, 0, sizeof visited);
    dfs(i);
    if (count(visited + 1, visited + n + 1, 1) == n) {
      puts("Yes");
      return 0;
    }
  }
  puts("No");
  return 0;
}
