#include <bits/stdc++.h>
using namespace std;
long long n, a[405], b[105];
bool comp(pair<int, int> x, pair<int, int> y) {
  return x.first + x.second > y.first + y.second;
}
void Solve(int t) {
  long long ans = 0, fg = 1, x, y, i, j, k, gc = 0, r;
  cin >> n >> r;
  vector<pair<long long, long long>> v;
  vector<pair<long long, long long>> v2;
  for (i = 1; i <= n; i++) {
    cin >> a[i] >> b[i];
    if (b[i] >= 0)
      v.push_back(make_pair(a[i], b[i]));
    else
      v2.push_back(make_pair(a[i], b[i]));
  }
  sort(v.begin(), v.end());
  for (i = 0; i < v.size(); i++) {
    if (v[i].first <= r) {
      r += v[i].second;
    } else
      fg = 0;
    if (r < 0) fg = 0;
  }
  sort(v2.begin(), v2.end(), comp);
  for (i = 0; i < v2.size(); i++) {
    if (v2[i].first <= r) {
      r += v2[i].second;
    } else
      fg = 0;
    if (r < 0) fg = 0;
  }
  if (fg)
    cout << "YES\n";
  else
    cout << "NO\n";
}
int main() {
  int t, T;
  T = 1;
  for (t = 1; t <= T; t++) {
    Solve(t);
  }
  return 0;
}
