#include <bits/stdc++.h>
using namespace std;
long long n, r, f = 1;
vector<pair<long long, long long> > pos, neg;
bool cmp1(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first != b.first)
    return a.first < b.first;
  else
    return a.second > b.second;
}
bool cmp2(pair<long long, long long> a, pair<long long, long long> b) {
  return a.first + a.second > b.first + b.second;
}
int main(int argc, char const *argv[]) {
  cin >> n >> r;
  for (int i = 0; i < n; ++i) {
    long long x, y;
    cin >> x >> y;
    if (y >= 0)
      pos.push_back(make_pair(x, y));
    else
      neg.push_back(make_pair(x, y));
  }
  sort(pos.begin(), pos.end(), cmp1);
  sort(neg.begin(), neg.end(), cmp2);
  for (int i = 0; i < pos.size(); ++i) {
    if (r < pos[i].first) {
      f = 0;
      break;
    } else
      r += pos[i].second;
  }
  if (f) {
    for (int i = 0; i < neg.size(); ++i) {
      if (r < neg[i].first) {
        f = 0;
        break;
      } else
        r += neg[i].second;
    }
  }
  if (f && r >= 0)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
