#include <bits/stdc++.h>
#pragma GCC optimize("O3", "unroll-loops")
using namespace std;
template <class T, class U>
inline void checkmin(T &x, U y) {
  if (y < x) x = y;
}
template <class T, class U>
inline void checkmax(T &x, U y) {
  if (y > x) x = y;
}
template <class T, class U>
inline bool ifmax(T &x, U y) {
  if (y > x) return x = y, true;
  return false;
}
template <class T, class U>
inline bool ifmin(T &x, U y) {
  if (y < x) return x = y, true;
  return false;
}
template <class T>
inline void sort(T &a) {
  sort(a.begin(), a.end());
}
template <class T>
inline void rsort(T &a) {
  sort(a.rbegin(), a.rend());
}
template <class T>
inline void reverse(T &a) {
  reverse(a.begin(), a.end());
}
template <class T, class U>
inline istream &operator>>(istream &str, pair<T, U> &p) {
  return str >> p.first >> p.second;
}
template <class T>
inline istream &operator>>(istream &str, vector<T> &a) {
  for (auto &i : a) str >> i;
  return str;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cout << fixed << setprecision(12);
  ;
  srand(94385);
  int n, r;
  cin >> n >> r;
  vector<pair<int, int> > negative, other;
  for (int i = 0; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    if (b < 0)
      negative.push_back({a, b});
    else
      other.push_back({a, b});
  }
  sort(other);
  int ans = 0;
  for (auto &i : other) {
    if (i.first > r) break;
    r += i.second;
    ++ans;
  }
  for (auto &i : negative) checkmax(i.first, -i.second);
  vector<int> dp(r + 1);
  sort(negative.begin(), negative.end(),
       [](const pair<int, int> &a, const pair<int, int> &b) {
         return a.first + a.second > b.first + b.second;
       });
  for (auto project : negative) {
    for (int t = max(project.first, -project.second); t <= r; ++t)
      checkmax(dp[t + project.second], dp[t] + 1);
  }
  int add = 0;
  for (int i = 0; i <= r; ++i) checkmax(add, dp[i]);
  cout << (ans + add == n ? "YES" : "NO");
  return 0;
}
