#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > posi;
vector<pair<int, pair<int, int> > > neg;
int dp[101][100001];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, r;
  int ans = 0;
  int i, j;
  cin >> n >> r;
  for (i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    if (y >= 0)
      posi.push_back(pair<int, int>(x, y));
    else
      neg.push_back(pair<int, pair<int, int> >(x + y, pair<int, int>(x, y)));
  }
  sort(posi.begin(), posi.end());
  sort(neg.begin(), neg.end());
  for (i = 0; i < posi.size(); i++) {
    if (r >= posi[i].first)
      r += posi[i].second, ans++;
    else {
      cout << "NO" << endl;
      return 0;
    }
  }
  for (i = 1; i <= neg.size(); i++) {
    for (j = 1; j < max(max(neg[i - 1].first, 0) - neg[i - 1].second.second, 1);
         j++)
      dp[i][j] = max(dp[i][j - 1], dp[i - 1][j]);
    for (j = max(max(neg[i - 1].first, 0) - neg[i - 1].second.second, 1);
         j <= r; j++)
      dp[i][j] = max(max(dp[i][j - 1], dp[i - 1][j]),
                     dp[i - 1][j + neg[i - 1].second.second] + 1);
  }
  if (dp[neg.size()][r] + ans == n)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
