#include <bits/stdc++.h>
using namespace std;
const int hashP = 239017;
const int N = 1e5 + 10;
const int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, r;
  cin >> n >> r;
  vector<pair<int, int> > a, b;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (y < 0)
      b.push_back({x, y});
    else
      a.push_back({x, y});
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < a.size(); i++) {
    if (r < a[i].first) {
      cout << "NO";
      return 0;
    } else {
      r += a[i].second;
    }
  }
  for (auto& now : b) {
    now.first = max(now.first, -now.second);
  }
  sort(b.begin(), b.end(), [&](pair<int, int> l, pair<int, int> r) {
    return (l.first + l.second) > (r.first + r.second);
  });
  for (int i = 0; i < b.size(); i++) {
    if (r < b[i].first) {
      cout << "NO";
      return 0;
    } else {
      r += b[i].second;
    }
  }
  cout << "YES";
  return 0;
}
