#include <bits/stdc++.h>
using namespace std;
int INF = 2e9;
int INF1 = 1000005;
vector<int> pref(string& s) {
  int n = s.size();
  vector<int> g(n, 0);
  for (int i = 1; i < n; i++) {
    int j = g[i - 1];
    while (j > 0 and s[i] != s[j]) {
      j = g[j - 1];
    }
    if (s[i] == s[j]) j++;
    g[i] = j;
  }
  return g;
}
struct wor {
  int a, b;
};
bool cmp(wor w1, wor w2) {
  if (w1.a == w2.a) {
    return w1.b > w2.b;
  }
  return w1.a < w2.a;
}
bool cmp1(wor w1, wor w2) { return w1.a + w1.b > w2.a + w2.b; }
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, r;
  cin >> n >> r;
  vector<wor> g1;
  vector<wor> g2;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    if (b < 0) {
      g2.push_back({a, b});
    } else {
      g1.push_back({a, b});
    }
  }
  sort(g1.begin(), g1.end(), cmp);
  sort(g2.begin(), g2.end(), cmp1);
  for (int i = 0; i < g1.size(); i++) {
    if (g1[i].a > r) {
      cout << "NO";
      return 0;
    } else {
      r += g1[i].b;
    }
  }
  for (int i = 0; i < g2.size(); i++) {
    if (g2[i].a > r) {
      cout << "NO";
      return 0;
    } else {
      r += g2[i].b;
    }
  }
  if (r < 0)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
