#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, r;
  scanf("%d%d", &n, &r);
  vector<pair<int, int> > pos, neg;
  for (int((i)) = (0); ((i)) < ((n)); ++((i))) {
    int a, b;
    scanf("%d%d", &a, &b);
    if (b >= 0)
      pos.emplace_back(a, b);
    else
      neg.emplace_back(a, b);
  }
  sort(pos.begin(), pos.end());
  for (pair<int, int> p : pos) {
    if (p.first > r) {
      printf("NO\n");
      return 0;
    }
    r += p.second;
  }
  sort(neg.begin(), neg.end(),
       [](const pair<int, int> &s, const pair<int, int> &t) {
         return s.first + s.second > t.first + t.second;
       });
  for (pair<int, int> p : neg) {
    if (p.first > r || r + p.second < 0) {
      printf("NO\n");
      return 0;
    }
    r += p.second;
  }
  printf("YES\n");
}
