#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long long int, long long int> &a,
          pair<long long int, long long int> &b) {
  return a.first + a.second > b.first + b.second;
}
int main() {
  long long int ne, r;
  cin >> ne >> r;
  long long int boo = ne;
  vector<pair<long long int, long long int>> p, n;
  while (ne--) {
    long long int x, y;
    cin >> x >> y;
    if (y > 0) {
      p.push_back(make_pair(x, y));
    } else {
      n.push_back(make_pair(x, y));
    }
  }
  sort(p.begin(), p.end());
  sort(n.begin(), n.end(), comp);
  long long int ex = 0;
  for (long long int i = 0; i < p.size(); i++) {
    if (r < p[i].first) {
      continue;
    } else {
      ex++;
      r += p[i].second;
    }
  }
  vector<vector<long long int>> dp(n.size() + 1,
                                   vector<long long int>(r + 1, 0));
  dp[0][r] = ex;
  for (long long int i = 0; i < n.size(); i++) {
    for (long long int j = 0; j <= r; j++) {
      if (j >= (n[i].first) && (j + n[i].second) > -1) {
        dp[i + 1][j + n[i].second] =
            max(dp[i + 1][j + n[i].second], dp[i][j] + 1);
      }
      dp[i + 1][j] = max(dp[i][j], dp[i + 1][j]);
    }
  }
  long long int out = 0;
  for (long long int i = 0; i <= r; i++) {
    out = max(dp[int(n.size())][i], out);
  }
  if (out == boo) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
