#include <bits/stdc++.h>
using namespace std;
const int INF = 400;
bool cmp(pair<int, int> a, pair<int, int> b) {
  return a.first + a.second > b.first + b.second;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, r;
  cin >> n >> r;
  vector<pair<int, int> > pos, neg;
  for (int i = 0; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    if (b >= 0)
      pos.push_back({a, b});
    else
      neg.push_back({a, b});
  }
  bool flag = 0;
  sort(pos.begin(), pos.end());
  sort(neg.begin(), neg.end(), cmp);
  for (int i = 0; i < pos.size() && !flag; ++i) {
    if (r >= pos[i].first)
      r += pos[i].second;
    else
      flag = 1;
  }
  for (int i = 0; i < neg.size() && !flag; ++i) {
    if (r >= neg[i].first)
      r += neg[i].second;
    else
      flag = 1;
  }
  (!flag && r >= 0) ? cout << "YES\n" : cout << "NO\n";
  return 0;
}
