#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7;
const int inf = INT_MAX;
const long long inff = 1e18;
const long long mod = 1e9 + 7;
int n, r, a, b;
vector<pair<int, int> > pos, zero, neg;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> r;
  for (int i = 1; i <= n; i++) {
    cin >> a >> b;
    if (b > 0)
      pos.push_back(make_pair(a, b));
    else if (b < 0)
      neg.push_back(make_pair(a, b));
    else
      zero.push_back(make_pair(a, b));
  }
  sort((pos).begin(), (pos).end(), [&](pair<int, int> x, pair<int, int> y) {
    if (x.first == y.first)
      return x.second < y.second;
    else
      return x.first < y.first;
  });
  sort((neg).begin(), (neg).end(), [&](pair<int, int> x, pair<int, int> y) {
    if (x.first + x.second != y.first + y.second)
      return x.first + x.second > y.first + y.second;
    else if (x.first == y.first)
      return x.second > y.second;
    else
      return x.first > y.first;
  });
  for (pair<int, int> i : pos) {
    if (i.first > r) return cout << "NO" << '\n', 0;
    r += i.second;
  }
  for (pair<int, int> i : zero) {
    if (i.first > r) return cout << "NO" << '\n', 0;
    r += i.second;
  }
  for (pair<int, int> i : neg) {
    if (i.first > r) return cout << "NO" << '\n', 0;
    r += i.second;
  }
  if (r < 0)
    cout << "NO" << '\n';
  else
    cout << "YES" << '\n';
}
