#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 7;
const long double EPS = 1e-8;
const long long MAXI = 20000;
const long long MOD = 16714589;
const long long MAXST = 2000000;
const long double PI = 3.14159265358979323;
vector<pair<long long, long long> > v, v1;
long long u[100000];
bool cmp(pair<long long, long long> x, pair<long long, long long> y) {
  return (x.first < y.first);
}
bool cmp1(pair<long long, long long> x, pair<long long, long long> y) {
  return (x.first + x.second > y.second + y.first);
}
signed main() {
  {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout << fixed << setprecision(10);
    cerr << fixed << setprecision(10);
  };
  long long n, r;
  cin >> n >> r;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    if (y >= 0)
      v.emplace_back(x, y);
    else
      v1.emplace_back(x, y);
  }
  sort(v.begin(), v.end(), cmp);
  sort(v1.begin(), v1.end(), cmp1);
  bool z = true;
  for (auto i : v) {
    if (r < i.first) z = false;
    r += i.second;
    if (r < 0) z = false;
  }
  if (!z) return cout << "NO\n", 0;
  u[r] = 0;
  for (long long i = 0; i < r; i++) u[i] = INF;
  for (long long i = 0; i < v1.size(); i++) {
    long long a = v1[i].first, b = abs(v1[i].second);
    for (long long j = 0; j + b <= r; j++) {
      if (j + b >= a && u[j + b] != INF) u[j] = u[j + b] + 1;
    }
  }
  z = false;
  for (long long i = 0; i <= r; i++) {
    if (u[i] == v1.size()) z = true;
  }
  if (!z)
    cout << "NO\n";
  else
    cout << "YES\n";
  return 0;
}
