#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, -1, -1, 1, 1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
template <class T>
inline T biton(T n, T pos) {
  return n | ((T)1 << pos);
}
template <class T>
inline T bitoff(T n, T pos) {
  return n & ~((T)1 << pos);
}
template <class T>
inline T ison(T n, T pos) {
  return (bool)(n & ((T)1 << pos));
}
template <class T>
inline T gcd(T a, T b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
inline int nxt() {
  int aaa;
  scanf("%d", &aaa);
  return aaa;
}
inline long long lxt() {
  long long aaa;
  scanf("%lld", &aaa);
  return aaa;
}
inline double dxt() {
  double aaa;
  scanf("%lf", &aaa);
  return aaa;
}
void solve() {
  vector<pair<int, pair<int, int> > > neg;
  vector<pair<int, int> > pos;
  int n = nxt(), r = nxt();
  while (n--) {
    int x = nxt(), y = nxt();
    if (y < 0)
      neg.push_back(make_pair(x + y, make_pair(x, y)));
    else
      pos.push_back(make_pair(x, y));
  }
  sort(neg.begin(), neg.end());
  sort(pos.begin(), pos.end());
  reverse(neg.begin(), neg.end());
  bool ok = true;
  for (auto it : pos) {
    if (it.first <= r) {
      r += it.second;
    } else {
      ok = false;
      break;
    }
  };
  for (auto it : neg) {
    if (it.second.first <= r) {
      r += it.second.second;
      if (r < 0) {
        ok = false;
        break;
      }
    } else {
      ok = false;
      break;
    }
  }
  cout << (ok ? "YES" : "NO") << '\n';
}
int main() {
  cout.setf(ios::fixed);
  cout.precision(10);
  int tc = 1;
  while (tc--) {
    solve();
  }
  return 0;
}
