#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, flag = 0;
  int x[1001], y[1001];
  cin >> s >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  for (int i = 1; i <= n - 1; i++) {
    int j = i;
    while (j > 0 && x[j] < x[j - 1]) {
      int temp = x[j];
      x[j] = x[j - 1];
      x[j - 1] = temp;
      temp = y[j];
      y[j] = y[j - 1];
      y[j - 1] = temp;
      j--;
    }
  }
  for (int i = 0; i < n; i++) {
    if (s <= x[i]) {
      flag = 1;
      break;
    } else
      s += y[i];
  }
  if (flag == 1)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
