#include <bits/stdc++.h>
using namespace std;
bool cmp(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>> a, b;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    x = max(x, -y);
    if (y >= 0)
      a.push_back({x, y});
    else
      b.push_back({x, y});
  }
  sort(a.begin(), a.end());
  for (auto u : a) {
    if (u.first <= r) {
      r += u.second;
    } else {
      cout << "NO\n";
      return;
    }
  }
  sort(b.begin(), b.end(), cmp);
  for (auto u : b) {
    if (u.first <= r) {
      r += u.second;
    } else {
      cout << "NO\n";
      return;
    }
  }
  cout << "YES\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout.precision(30);
  long long t = 1;
  while (t--) solve();
}
