#include <bits/stdc++.h>
using namespace std;
const int maxn = 300 + 10;
struct data {
  int aa, bb;
};
int n, r;
data pos[maxn], neg[maxn];
int npos = 0, nneg = 0;
bool cmp(data x, data y) {
  if (x.aa != y.aa) return x.aa < y.aa;
  return x.bb > y.bb;
}
bool cmp2(data x, data y) { return x.aa + x.bb > y.aa + y.bb; }
int main() {
  scanf("%d%d", &n, &r);
  for (int i = 1; i <= n; i++) {
    int aa, bb;
    scanf("%d%d", &aa, &bb);
    if (bb >= 0) {
      npos++;
      pos[npos].aa = aa;
      pos[npos].bb = bb;
    } else {
      nneg++;
      neg[nneg].aa = aa;
      neg[nneg].bb = bb;
    }
  }
  sort(pos + 1, pos + npos + 1, cmp);
  int flag = 1;
  for (int i = 1; i <= npos; i++) {
    if (pos[i].aa <= r)
      r = r + pos[i].bb;
    else {
      flag = 0;
      break;
    }
  }
  if (flag == 1) {
    for (int i = 1; i <= nneg; i++) neg[i].aa = max(neg[i].aa, -neg[i].bb);
    sort(neg + 1, neg + nneg + 1, cmp2);
    for (int i = 1; i <= nneg; i++) {
      if (neg[i].aa <= r)
        r = r + neg[i].bb;
      else {
        flag = 0;
        break;
      }
    }
  }
  if (flag == 1)
    printf("YES");
  else
    printf("NO");
}
