#include <bits/stdc++.h>
typedef struct str {
  int x, y;
} * STRPTR;
void merge(STRPTR num[], int m) {
  int i, j, l1, l2, u1, u2, k, size, flag;
  STRPTR aux[m];
  int r;
  for (r = 1; r <= m; r++) aux[r] = (STRPTR)malloc(sizeof(struct str));
  size = 1;
  while (size < m) {
    flag = 0;
    l1 = 1;
    k = 1;
    while (l1 + size <= m) {
      u1 = l1 + size - 1;
      l2 = u1 + 1;
      u2 = (l2 + size - 1 <= m) ? l2 + size - 1 : m;
      i = l1;
      j = l2;
      while (i <= u1 && j <= u2)
        if (num[i]->x < num[j]->x)
          *aux[k++] = *num[i++];
        else
          *aux[k++] = *num[j++];
      while (i <= u1) *aux[k++] = *num[i++];
      while (j <= u2) *aux[k++] = *num[j++];
      l1 = u2 + 1;
    }
    while (k <= m) *aux[k++] = *num[j++];
    size *= 2;
    if (size >= m)
      break;
    else
      ;
    flag = 1;
    l1 = 1;
    k = 1;
    while (l1 + size <= m) {
      u1 = l1 + size - 1;
      l2 = u1 + 1;
      u2 = (l2 + size - 1 <= m) ? l2 + size - 1 : m;
      i = l1;
      j = l2;
      while (i <= u1 && j <= u2)
        if (aux[i]->x < aux[j]->x)
          *num[k++] = *aux[i++];
        else
          *num[k++] = *aux[j++];
      while (i <= u1) *num[k++] = *aux[i++];
      while (j <= u2) *num[k++] = *aux[j++];
      l1 = u2 + 1;
    }
    while (k <= m) *num[k++] = *aux[j++];
    size *= 2;
  }
  if (flag == 1)
    ;
  else if (flag == 0)
    for (i = 1; i <= m; i++) *num[i] = *aux[i];
  return;
}
void create(STRPTR s1[], int n) {
  int i, a, b;
  for (i = 1; i <= n; i++) {
    s1[i] = (STRPTR)malloc(sizeof(struct str));
    scanf("%d%d", &a, &b);
    s1[i]->x = a;
    s1[i]->y = b;
  }
}
int main() {
  int s, n, i, j, t;
  scanf("%d%d", &s, &n);
  t = s;
  STRPTR s1[n];
  create(s1, n);
  merge(s1, n);
  for (i = 1; i <= n; i++) {
    if (t <= s1[i]->x) {
      printf("NO");
      return 0;
    }
    t += s1[i]->y;
  }
  printf("YES");
  return 0;
}
