#include <bits/stdc++.h>
const int MAXN = 110;
using namespace std;
int n, r;
bool ok = true;
vector<pair<int, int> > pos, neg;
int main() {
  scanf("%d%d", &n, &r);
  for (int i = 0; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    if (b >= 0)
      pos.push_back({a, b});
    else
      neg.push_back({a + b, -b});
  }
  sort(pos.begin(), pos.end());
  sort(neg.begin(), neg.end());
  for (pair<int, int> i : pos) {
    if (r < i.first) ok = false;
    r += i.second;
  }
  for (int j = neg.size() - 1; j >= 0; j--) {
    pair<int, int> i = neg[j];
    if (r - i.second < 0 || r - i.second < i.first) ok = false;
    r -= i.second;
  }
  if (r < 0) ok = false;
  printf("%s\n", ok ? "YES" : "NO");
}
