#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long long int, long long int> &a,
          pair<long long int, long long int> &b) {
  return a.first + a.second > b.first + b.second;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  long long int n, r;
  cin >> n >> r;
  vector<pair<long long int, long long int> > pos, neg;
  for (long long int i = 0; i < n; i++) {
    long long int x, y;
    cin >> x >> y;
    if (y >= 0)
      pos.push_back({x, y});
    else
      neg.push_back({x, y});
  }
  sort(pos.begin(), pos.end());
  sort(neg.begin(), neg.end(), comp);
  for (long long int i = 0; i < (long long int)pos.size(); i++) {
    if (r < pos[i].first) return cout << "NO\n", 0;
    r += pos[i].second;
  }
  for (long long int i = 0; i < (long long int)neg.size(); i++) {
    if (r < neg[i].first) return cout << "NO\n", 0;
    r += neg[i].second;
  }
  if (r < 0)
    cout << "NO\n";
  else
    cout << "YES\n";
}
