#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> a, b;
vector<pair<int, int> > pos, neg;
int mem[(100 + 5)][(100 + 5)][(100 + 5)], dp[(100 + 5)][(100 + 5)];
bool can = true;
string unsorted(int r) {
  memset(dp, -1, sizeof dp);
  memset(mem, -1, sizeof mem);
  n = (int)b.size();
  for (int p = (0); p <= (n - 1); p++) {
    if (a[p] > r) continue;
    if (r + b[p] < 0) continue;
    dp[p][1] = b[p] + r;
    mem[p][1][p] = 1;
  }
  int mx, idx;
  for (int day = (2); day <= (n); day++) {
    for (int p = (0); p <= (n - 1); p++) {
      mx = idx = -1;
      for (int h = (0); h <= (n - 1); h++) {
        if (p == h) continue;
        if (mem[h][day - 1][p] != -1) continue;
        if (dp[h][day - 1] < a[p]) continue;
        if (dp[h][day - 1] + b[p] < 0) continue;
        if (mx < dp[h][day - 1]) {
          mx = dp[h][day - 1];
          idx = h;
        }
      }
      if (mx == -1) continue;
      for (int h = (0); h <= (n - 1); h++) {
        mem[p][day][h] = mem[idx][day - 1][h];
      }
      dp[p][day] = b[p] + dp[idx][day - 1];
      mem[p][day][p] = day;
    }
  }
  can = false;
  for (int p = (0); p <= (n - 1); p++) {
    if (dp[p][n] != -1) {
      can = true;
      break;
    }
  }
  if (can || n == 0) return "YES";
  return "NO";
}
string sorted(int r) {
  memset(dp, -1, sizeof dp);
  memset(mem, -1, sizeof mem);
  sort(neg.rbegin(), neg.rend());
  n = neg.size();
  for (int p = (0); p <= (n - 1); p++) {
    if (neg[p].first > r) continue;
    if (r + neg[p].second < 0) continue;
    dp[p][1] = neg[p].second + r;
    mem[p][1][p] = 1;
  }
  int mx, idx;
  for (int day = (2); day <= (n); day++) {
    for (int p = (0); p <= (n - 1); p++) {
      mx = idx = -1;
      for (int h = (0); h <= (n - 1); h++) {
        if (p == h) continue;
        if (mem[h][day - 1][p] != -1) continue;
        if (dp[h][day - 1] < neg[p].first) continue;
        if (dp[h][day - 1] + neg[p].second < 0) continue;
        idx = h;
        break;
      }
      if (idx == -1) continue;
      for (int h = (0); h <= (n - 1); h++) {
        mem[p][day][h] = mem[idx][day - 1][h];
      }
      dp[p][day] = neg[p].second + dp[idx][day - 1];
      mem[p][day][p] = day;
    }
  }
  can = false;
  for (int p = (0); p <= (n - 1); p++) {
    if (dp[p][n] != -1) {
      can = true;
      break;
    }
  }
  if (can || n == 0) return "YES";
  return "NO";
}
int r;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> r;
  int x, y;
  for (int i = (0); i <= (n - 1); i++) {
    cin >> x >> y;
    if (y >= 0) {
      pos.push_back({x, y});
    } else {
      a.push_back(x);
      b.push_back(y);
      neg.push_back({x, y});
    }
  }
  sort(pos.begin(), pos.end());
  for (int i = (0); i <= ((int)pos.size() - 1); i++) {
    if (pos[i].first > r) {
      can = false;
      break;
    }
    r += pos[i].second;
  }
  if (!can) {
    return cout << "NO" << endl, 0;
  }
  string ans = sorted(r);
  if (ans == "NO") ans = unsorted(r);
  cout << ans << endl;
  return 0;
}
