#include <bits/stdc++.h>
using namespace std;
inline void solve();
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
bool comp(pair<long long, long long> &a, pair<long long, long long> b) {
  return a.first + a.second > b.first + b.second;
}
void solve() {
  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) {
      neg.push_back({max(a, -b), b});
    } else {
      pos.push_back({a, b});
    }
  }
  sort(pos.begin(), pos.end());
  sort(neg.begin(), neg.end(), comp);
  for (auto e : pos) {
    if (e.first > r) {
      cout << "NO";
      return;
    }
    r += e.second;
  }
  for (auto e : neg) {
    if (e.first > r) {
      cout << "NO";
      return;
    }
    r += e.second;
  }
  cout << "YES";
}
