#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;
  cin >> n >> r;
  vector<pair<int, int>> pos;
  vector<pair<int, int>> neg;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    if (b >= 0) {
      pos.push_back(make_pair(a, b));
    } else {
      neg.push_back(make_pair(a, b));
    }
  }
  sort(pos.begin(), pos.end());
  sort(neg.begin(), neg.end(), comp);
  for (int i = 0; i < pos.size(); i++) {
    if (r >= pos[i].first) {
      r += pos[i].second;
    } else {
      cout << "NO";
      return 0;
    }
  }
  for (int i = 0; i < neg.size(); i++) {
    if (r >= neg[i].first && r >= abs(neg[i].second)) {
      r += neg[i].second;
    } else {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
}
