#include <bits/stdc++.h>
using namespace std;
bool fun(pair<int, int> p1, pair<int, int> p2) {
  if (p1.first + p1.second == p2.first + p2.second) {
    return p1.first > p2.first;
  }
  return p1.first + p1.second > p2.first + p2.second;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, r;
  cin >> n >> r;
  vector<pair<int, int> > v1, v2;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    if (b >= 0) {
      v1.push_back({a, b});
    } else {
      v2.push_back({a, b});
    }
  }
  bool flag = 1;
  sort(v1.begin(), v1.end());
  for (pair<int, int> p : v1) {
    if (p.first <= r) {
      r += p.second;
    } else {
      flag = 0;
    }
  }
  sort(v2.begin(), v2.end(), fun);
  for (pair<int, int> p : v2) {
    if (p.first <= r) {
      r += p.second;
    } else {
      flag = 0;
    }
  }
  if (r < 0) {
    flag = 0;
  }
  if (!flag) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
  return 0;
}
