#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
vector<vector<int>> dp;
int n, r;
pair<int, int> arr[110];
bool cmp(const pair<int, int> &one, const pair<int, int> &two) {
  int a = max(one.first, max(-one.second, two.first - one.second));
  int b = max(two.first, max(-two.second, one.first - two.second));
  return a < b;
}
void solve() {
  cin >> n >> r;
  vector<pair<int, int>> pos, neg;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    if (y >= 0) {
      pos.emplace_back(x, y);
    } else {
      neg.emplace_back(x, y);
    }
  }
  sort(pos.begin(), pos.end());
  sort(neg.begin(), neg.end(), cmp);
  bool bad = 0;
  for (auto ele : pos) {
    if (ele.first <= r && r + ele.second >= 0) {
      r += ele.second;
    } else {
      bad = 1;
      break;
    }
  }
  if (bad) {
    printf("NO\n");
    return;
  }
  for (auto ele : neg) {
    if (ele.first <= r && r + ele.second >= 0) {
      r += ele.second;
    } else {
      bad = 1;
      break;
    }
  }
  if (!bad) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
}
int main(int argv, char **argc) {
  for (int i = 0; i < 1; ++i) {
    solve();
  }
}
