#include <bits/stdc++.h>
using namespace std;
const long long maxn = 333;
long long n, m, r;
long long ans;
multiset<long long> s;
pair<long long, long long> p[maxn], q[maxn];
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  return a.first + a.second > b.first + b.second;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> r;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    x = max(x, -y);
    if (y < 0)
      p[i] = {x, y};
    else
      q[m++] = {x, y}, n--, i--;
  }
  sort(q, q + m);
  for (long long i = 0; i < m; i++)
    if (q[i].first <= r) r += q[i].second, ans++;
  sort(p, p + n, cmp);
  for (long long i = 0; i < n; i++)
    if (p[i].first <= r) {
      r += p[i].second;
      s.insert(p[i].second);
    } else if (s.size() and *s.begin() < p[i].second) {
      long long t = *s.begin();
      s.erase(s.find(t));
      r -= t;
      r += p[i].second;
      s.insert(p[i].second);
    }
  if (ans + s.size() == n + m)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
