#include <bits/stdc++.h>
using namespace std;
int n, r, i, x, y, dp[3000001], j;
vector<pair<int, int>> pos, neg;
bool cmp(pair<int, int> l, pair<int, int> r) {
  return l.first + l.second > r.first + r.second;
}
int main() {
  scanf("%d%d", &n, &r);
  neg.push_back({1e8, 1e8});
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &x, &y);
    if (y < 0)
      neg.push_back({x, y});
    else
      pos.push_back({x, y});
  }
  sort(pos.begin(), pos.end());
  for (i = 0; i < pos.size(); i++)
    if (r >= pos[i].first) r += pos[i].second, dp[0]++;
  for (i = 1; i <= r; i++) dp[i] = dp[i - 1];
  sort(neg.begin(), neg.end(), cmp);
  for (i = 1; i < neg.size(); i++)
    for (j = neg[i].first; j <= r; j++)
      if (j + neg[i].second >= 0)
        dp[j + neg[i].second] = max(dp[j + neg[i].second], dp[j] + 1);
  j = 0;
  for (i = 0; i <= r; i++) j = max(j, dp[i]);
  if (n == j)
    puts("YES");
  else
    puts("NO");
}
