#include <bits/stdc++.h>
using namespace std;
int n, r, a, b;
vector<pair<int, int> > pos, neg;
bool cmp1(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
bool cmp2(pair<int, int> a, pair<int, int> b) {
  return max(a.first, -a.second) + a.second >
         max(b.first, -b.second) + b.second;
}
int nuu() {
  cout << "NO" << '\n';
  exit(0);
}
int main() {
  cin >> n >> r;
  for (int i = (0); i < (n); i++) {
    cin >> a >> b;
    if (b >= 0)
      pos.push_back({a, b});
    else
      neg.push_back({a, b});
  }
  sort(pos.begin(), pos.end(), cmp1);
  sort(neg.begin(), neg.end(), cmp2);
  for (pair<int, int> p : pos) {
    if (p.first <= r)
      r += p.second;
    else
      nuu();
  }
  for (pair<int, int> p : neg) {
    if (p.first <= r)
      r += p.second;
    else
      nuu();
  }
  cout << "YES" << '\n';
  return 0;
}
