#include <bits/stdc++.h>
using namespace std;
bool comp(const pair<int, int>& a, const pair<int, int>& b) {
  return a.first + a.second > b.first + b.second;
}
int main() {
  int n, r, x, y;
  cin >> n >> r;
  vector<pair<int, int>> pp, pn;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (y >= 0)
      pp.push_back(make_pair(x, y));
    else
      pn.push_back(make_pair(max(x, -y), y));
  }
  sort(pp.begin(), pp.end());
  sort(pn.begin(), pn.end(), comp);
  for (int i = 0; i < pp.size(); i++) {
    if (r >= pp[i].first)
      r += pp[i].second;
    else {
      cout << "NO";
      return 0;
    }
  }
  for (int i = 0; i < pn.size(); i++) {
    if (r >= pn[i].first)
      r += pn[i].second;
    else {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
