#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  return a.first + a.second > b.first + b.second;
}
signed main() {
  long long n, r;
  cin >> n >> r;
  vector<pair<long long, long long> > pos, neg;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    if (b >= 0)
      pos.push_back({a, b});
    else
      neg.push_back({max(a, -b), b});
  }
  bool fg = false;
  sort(pos.begin(), pos.end());
  sort(neg.begin(), neg.end(), cmp);
  for (auto it : pos) {
    if (r >= it.first)
      r += it.second;
    else
      fg = true;
  }
  for (auto it : neg) {
    if (r >= it.first)
      r += it.second;
    else
      fg = true;
  }
  if (r < 0) fg = true;
  if (fg)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
