#include <bits/stdc++.h>
using namespace std;
const int MAXN = 50;
int n, m;
int a[MAXN][MAXN];
int cnt[MAXN];
int used[MAXN];
bool failed;
int find_last(int i) {
  used[i] = 1;
  for (int j = 0; j < n; ++j) {
    if (a[i][j] > 0 && !used[j]) {
      return find_last(j);
    }
  }
  return i;
}
vector<pair<int, int> > solve() {
  memset(cnt, 0, sizeof cnt);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (a[i][j] > 0) {
        ++cnt[i];
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (a[i][j] > 2 || cnt[i] > 2 || (a[i][j] == 2 && cnt[i] > 1)) {
        failed = true;
        return vector<pair<int, int> >();
      }
    }
  }
  memset(used, 0, sizeof used);
  int nLoops = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i][i] > 0) {
      ++nLoops;
      if (a[i][i] > 1 || cnt[i] > 1) {
        failed = true;
        return vector<pair<int, int> >();
      }
    }
    if (!used[i]) {
      int j = find_last(i);
      if (a[i][j] == 2 || (a[i][j] == 1 && cnt[i] == 2 && cnt[j] == 2)) {
        bool all = true;
        for (int k = 0; k < n; ++k) {
          if (!used[k]) {
            all = false;
            break;
          }
        }
        if (i != 0 || !all) {
          failed = true;
          return vector<pair<int, int> >();
        }
      }
    }
  }
  if (nLoops > 1 || (nLoops == 1 && n > 1)) {
    failed = true;
    return vector<pair<int, int> >();
  }
  memset(used, 0, sizeof used);
  vector<pair<int, int> > vec;
  vector<pair<int, int> > ret;
  for (int i = 0; i < n; ++i) {
    if (used[i]) continue;
    if (cnt[i] == 0) {
      vec.push_back(pair<int, int>(i, i));
    } else if (cnt[i] == 1) {
      int j = find_last(i);
      if (i != j && a[i][j] < 2) {
        vec.push_back(pair<int, int>(min(i, j), max(i, j)));
      }
    }
  }
  while (vec.size() > 0) {
    sort(vec.begin(), vec.end());
    reverse(vec.begin(), vec.end());
    int i = (int)vec.size() - 1;
    if (i == 0) {
      ret.push_back(vec[i]);
      vec.pop_back();
    } else {
      int a = vec[i].first;
      int b = vec[i].second;
      int c = vec[i - 1].first;
      int d = vec[i - 1].second;
      ret.push_back(pair<int, int>(min(a, c), max(a, c)));
      vec.pop_back();
      vec[i - 1].first = min(b, d);
      vec[i - 1].second = max(b, d);
    }
  }
  return ret;
}
void read() {
  cin >> n >> m;
  memset(a, 0, sizeof a);
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    --x;
    --y;
    ++a[x][y];
    ++a[y][x];
    if (x == y) --a[x][y];
  }
}
int main() {
  read();
  failed = false;
  vector<pair<int, int> > ret = solve();
  if (failed) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    cout << ret.size() << endl;
    for (size_t i = 0; i < ret.size(); ++i) {
      cout << ret[i].first + 1 << " " << ret[i].second + 1 << endl;
    }
  }
  return 0;
}
