#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, int> a, pair<int, int> b) {
  long long r = abs(a.second + b.second), takeA = r + a.second,
            takeB = r + b.second;
  long long tmpA = takeA - b.first, tmpB = takeB - a.first;
  if (tmpA > tmpB) return 1;
  return 0;
}
int main() {
  long long n, r, tmp, tmp2, tmp3;
  vector<pair<long long, long long> > vec;
  set<long long> st;
  cin >> n >> r;
  pair<long long, long long> arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i].first >> arr[i].second;
  }
  sort(arr, arr + n);
  int i = 0;
  while (1) {
    if (i == n) break;
    if (r >= arr[i].first) {
      if (arr[i].second >= 0) {
        r += arr[i].second;
        i++;
      } else {
        vec.push_back({max(arr[i].first, -1 * arr[i].second), arr[i].second});
        i++;
      }
    } else if (i < n)
      return cout << "NO\n", 0;
  }
  sort(vec.begin(), vec.end(), cmp);
  for (int i = 0; i < vec.size(); i++) {
    if (r < vec[i].first) return cout << "NO\n", 0;
    r += vec[i].second;
  }
  if (r < 0) return cout << "NO\n", 0;
  cout << "YES\n";
  return 0;
}
