#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 + 17;
long long n, r, sum, ans;
vector<pair<int, int> > pos, neg;
long long p[MAXN * 4];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> r;
  for (int i = 1; i <= n; i++) {
    int a, b;
    cin >> a >> b;
    if (b >= 0)
      pos.push_back({a, b});
    else
      neg.push_back({a, -b}), p[-b]++;
  }
  for (int i = MAXN - 2; i >= 0; i--) p[i] += p[i + 1];
  sort(pos.begin(), pos.end());
  sort(neg.begin(), neg.end(), [](pair<int, int> i, pair<int, int> j) {
    return i.first - i.second > j.first - j.second;
  });
  for (auto i : pos) {
    if (i.first > r) break;
    r += i.second;
    ans++;
  }
  for (auto i : neg) {
    if (max(i.first, i.second) > r) break;
    r -= i.second;
    ans++;
  }
  cout << (ans == n ? "YES" : "NO") << endl;
  return 0;
}
