#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
long long powmod(long long a, long long l, long long md) {
  long long res = 1;
  while (l) {
    if (l & 1) res = res * a % md;
    l /= 2;
    a = a * a % md;
  }
  return res;
}
long long __set(long long b, long long i) { return b | (1 << i); }
long long __unset(long long b, long long i) { return b & !(1 << i); }
long long __check(long long b, long long i) { return b & (1 << i); }
long long mul(long long a, long long b) {
  return ((a % MOD) * (b % MOD)) % MOD;
}
long long add(long long a, long long b) { return (a + b) % MOD; }
long long sub(long long a, long long b) {
  return (((a - b) % MOD) + MOD) % MOD;
}
long long __div(long long a, long long b) {
  return mul(a, powmod(b, MOD - 2, MOD));
}
const long long inf = 0xFFFFFFFFFFFFFFFL;
priority_queue<long long, vector<long long>, greater<long long> > pq;
clock_t time_p = clock();
void time() {
  time_p = clock() - time_p;
  cerr << "Time Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
bool cmp(pair<long long, long long>& p1, pair<long long, long long>& p2) {
  return p1.first + p1.second > p2.first + p2.second;
}
int32_t main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, r;
  cin >> n >> r;
  vector<pair<long long, long long> > pos;
  vector<pair<long long, long long> > b;
  for (long long i = 0; i < n; i++) {
    long long a, bb;
    cin >> a >> bb;
    if (bb >= 0)
      pos.push_back({a, bb});
    else
      b.push_back({a, bb});
  }
  sort((pos).begin(), (pos).end());
  long long f = 1;
  for (long long i = 0; i < pos.size(); i++) {
    if (r < pos[i].first) {
      f = 0;
      break;
    } else
      r += pos[i].second;
  }
  if (b.size() == 0) {
    if (!f)
      cout << "NO"
           << "\n";
    else
      cout << "YES"
           << "\n";
    return 0;
  }
  sort((b).begin(), (b).end(), cmp);
  for (long long i = 0; i < b.size(); i++) {
    if (r < b[i].first) {
      f = 0;
      break;
    }
    r += b[i].second;
  }
  if (r < 0)
    cout << "NO"
         << "\n";
  else if (!f)
    cout << "NO"
         << "\n";
  else
    cout << "YES"
         << "\n";
  time();
  return 0;
}
