#include <bits/stdc++.h>
using namespace std;
class DFS {
 public:
  DFS(const int *deg, const int conn[][2], int n)
      : m_deg(deg), m_n(n), m_hasLoop(false), m_loopSize(0) {
    m_conn = new const int *[n + 1];
    for (int i = 1; i <= n; i++) m_conn[i] = &conn[i][0];
    m_visited = new int[n + 1];
    memset(m_visited, 0, (n + 1) * sizeof(int));
  }
  ~DFS() {
    delete[] m_visited;
    m_visited = NULL;
    for (int i = 0; i <= m_n; i++) m_conn[i] = NULL;
    delete[] m_conn;
  }
  void reset() {
    memset(m_visited, 0, (m_n + 1) * sizeof(int));
    m_hasLoop = false;
    m_loopSize = 0;
  }
  int search(int i, int from, int depth);
  int *visited() const { return m_visited; }
  bool hasLoop() const { return m_hasLoop; }
  int loopSize() const { return m_loopSize; }

 private:
  const int *m_deg;
  const int **m_conn;
  const int m_n;
  int *m_visited;
  bool m_hasLoop;
  int m_loopSize;
};
int DFS::search(int v, int from, int depth) {
  if (m_visited[v]) {
    m_hasLoop = true;
    m_loopSize = depth;
    return 1;
  }
  m_visited[v] = 1;
  bool skip = true;
  for (int i = 0; i < m_deg[v]; i++) {
    if (m_conn[v][i] == from && skip) {
      skip = false;
      continue;
    }
    if (search(m_conn[v][i], v, depth + 1) == 1) return 1;
  }
  return 0;
}
int transverse(int start, const int deg[], const int conn[][2]) {
  int j = conn[start][0];
  int prev = start;
  while (deg[j] == 2) {
    if (conn[j][0] == prev) {
      prev = j;
      j = conn[j][1];
    } else {
      prev = j;
      j = conn[j][0];
    }
  }
  return j;
}
int main() {
  int n, m;
  cin >> n >> m;
  int deg[n + 1];
  memset(deg, 0, (n + 1) * sizeof(int));
  int conn[n + 1][2];
  for (int i = 0; i < n + 1; i++) {
    memset(conn[i], 0, 2 * sizeof(int));
  }
  bool possible = true;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    if (deg[a] == 2 || deg[b] == 2) {
      possible = false;
      break;
    }
    conn[a][deg[a]] = b;
    conn[b][deg[b]] = a;
    deg[a]++;
    deg[b]++;
  }
  if (possible) {
    int single = 0;
    for (int i = 1; i <= n; i++) {
      if (deg[i] == 1) single++;
    }
    if (single % 2) possible = false;
  }
  if (possible) {
    set<int> v;
    for (int i = 1; i <= n; i++) {
      v.insert(i);
    }
    DFS dfs(deg, conn, n);
    while (!v.empty()) {
      dfs.search(*v.begin(), 0, 0);
      if (dfs.hasLoop() && dfs.loopSize() == n) {
        break;
      } else if (dfs.hasLoop()) {
        possible = false;
        break;
      } else {
        int *visited = dfs.visited();
        for (int i = 1; i <= n; i++) {
          if (visited[i]) v.erase(i);
        }
        dfs.reset();
      }
    }
  }
  if (possible) {
    vector<pair<int, int> > moves;
    set<int> tbc;
    int neighbor[n + 1];
    memset(neighbor, 0, (n + 1) * sizeof(int));
    int degCpy[n + 1];
    memcpy(degCpy, deg, (n + 1) * sizeof(int));
    for (int i = 1; i <= n; i++) {
      if (deg[i] <= 1) tbc.insert(i);
      if (deg[i] == 1) {
        neighbor[i] = transverse(i, deg, conn);
      }
    }
    while (!tbc.empty()) {
      set<int>::const_iterator it1 = tbc.begin();
      set<int>::const_iterator it2;
      int j1 = *it1;
      if (++degCpy[j1] == 2) {
        tbc.erase(it1);
        it2 = tbc.begin();
      } else {
        it2 = it1;
        if (tbc.size() > 1) {
          it2++;
        }
      }
      if (neighbor[j1] == *it2 && tbc.size() > 1) {
        it2++;
      }
      int j2 = *it2;
      if (++degCpy[j2] == 2) {
        tbc.erase(it2);
      }
      int j3 = (neighbor[j1] ? neighbor[j1] : j1);
      int j4 = (neighbor[j2] ? neighbor[j2] : j2);
      neighbor[j3] = j4;
      neighbor[j4] = j3;
      moves.push_back(make_pair(j1, j2));
    }
    cout << "YES" << endl;
    cout << moves.size() << endl;
    for (int i = 0; i < (int)moves.size(); i++) {
      pair<int, int> p = moves[i];
      cout << p.first << " " << p.second << endl;
    }
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
