#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
inline long long int rand(long long int x, long long int y) {
  ++y;
  return (rng() % (y - x)) + x;
}
string to_string(char c) {
  string second(1, c);
  return second;
}
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void degug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void degug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  degug_out(T...);
}
inline long long int gcd(long long int a, long long int b) {
  if (a > b) swap(a, b);
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int n, R;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> R;
  vector<pair<long long int, long long int> > pos, neg;
  long long int sum = 0;
  for (long long int i = (1); i <= (long long int)(n); ++i) {
    long long int a, b;
    cin >> a >> b;
    if (b >= 0)
      pos.emplace_back(a, b);
    else
      neg.emplace_back(a, b), sum += b;
  }
  sort((pos).begin(), (pos).end());
  reverse((pos).begin(), (pos).end());
  while (pos.size()) {
    if (R >= pos.back().first) {
      R += pos.back().second;
      pos.pop_back();
    } else {
      cout << "NO\n";
      return 0;
      break;
    }
  }
  R += sum;
  if (R < 0) {
    cout << "NO\n";
    return 0;
  }
  vector<pair<long long int, long long int> > solve;
  for (auto i : neg) {
    solve.emplace_back(i.first + i.second, i.second);
  }
  sort((solve).begin(), (solve).end());
  reverse((solve).begin(), (solve).end());
  multiset<long long int> ms;
  while (solve.size()) {
    while (solve.size() && solve.back().first <= R)
      ms.insert(solve.back().second), solve.pop_back();
    if (ms.empty()) {
      cout << "NO\n";
      return 0;
    }
    R -= *ms.begin();
    ms.erase(ms.begin());
  }
  cout << "YES\n";
}
