#include <bits/stdc++.h>
using namespace std;
const int MAX = 100 + 10;
int n, r;
pair<int, int> t[MAX];
bool sortowanie(pair<int, int> x, pair<int, int> y) {
  if (x.second >= 0 && y.second >= 0) return x.first < y.first;
  if (x.second < 0 && y.second < 0)
    return x.first + x.second > y.first + y.second;
  return x.second >= 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> r;
  for (int i = 1; i <= n; i++) cin >> t[i].first >> t[i].second;
  sort(t + 1, t + n + 1, sortowanie);
  for (int i = 1; i <= n; i++) {
    if (r < t[i].first) {
      cout << "NO\n";
      return 0;
    }
    r += t[i].second;
  }
  if (r < 0)
    cout << "NO\n";
  else
    cout << "YES\n";
}
