#include <bits/stdc++.h>
using namespace std;
int n, r;
int x[105], y[105];
vector<pair<int, int> > pos, neg;
bool cmp(pair<int, int> p1, pair<int, int> p2) {
  return p1.first + p1.second > p2.first + p2.second;
}
int main() {
  cin >> n >> r;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &x[i], &y[i]);
    if (y[i] >= 0)
      pos.push_back(pair<int, int>(x[i], y[i]));
    else
      neg.push_back(pair<int, int>(x[i], y[i]));
  }
  sort(pos.begin(), pos.end());
  sort(neg.begin(), neg.end(), cmp);
  for (int i = 0; i < pos.size(); i++) {
    if (pos[i].first <= r)
      r += pos[i].second;
    else {
      printf("NO\n");
      return 0;
    }
  }
  for (int i = 0; i < neg.size(); i++) {
    if (neg[i].first <= r)
      r += neg[i].second;
    else {
      printf("NO\n");
      return 0;
    }
    if (r < 0) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
  return 0;
}
