#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
long long n, m, ans;
string str;
bool comp(pair<long long, pair<long long, long long>>& a,
          pair<long long, pair<long long, long long>>& b) {
  return a.first + a.second.first > b.first + b.second.first;
}
long long solve() {
  long long r;
  cin >> n >> r;
  vector<pair<long long, long long>> v1;
  vector<pair<long long, pair<long long, long long>>> v2;
  for (long long i = 1; i <= n; ++i) {
    long long a, b;
    cin >> a >> b;
    if (b >= 0)
      v1.push_back({a, b});
    else {
      long long t = a;
      a = max(a, -b);
      v2.push_back({a, {b, t}});
    }
  }
  sort((v1).begin(), (v1).end());
  for (long long i = 0; i <= (long long)v1.size() - 1; ++i) {
    if (r >= v1[i].first)
      r += v1[i].second;
    else {
      cout << "NO";
      return 0;
    }
  }
  sort((v2).begin(), (v2).end(), comp);
  for (long long i = 0; i <= (long long)v2.size() - 1; ++i) {
    if (r >= v2[i].second.second)
      r += v2[i].second.first;
    else {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
signed main() {
  ios::sync_with_stdio(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
