#include <bits/stdc++.h>
using namespace std;
const int maxn = 111;
const int maxr = 1e5 + 7;
int n, r, Num_of_positive, processed_sub_num, dp[maxr];
pair<int, int> sub[maxn], processed_sub[maxn];
void input_preprocess() {
  scanf("%d %d", &n, &r);
  for (auto i = 1; i <= n; i++) scanf("%d %d", &sub[i].first, &sub[i].second);
  sort(sub + 1, sub + 1 + n, [&](pair<int, int> a, pair<int, int> b) -> bool {
    return a.first == b.first ? a.second > b.second : a.first < b.first;
  });
  for (auto i = 1; i <= n; i++) {
    if (sub[i].first > r)
      break;
    else if (sub[i].second >= 0) {
      Num_of_positive++;
      r += sub[i].second;
    }
  }
  for (auto i = 1; i <= n; i++) {
    if (sub[i].first > r) return;
    if (sub[i].second < 0) processed_sub[++processed_sub_num] = sub[i];
  }
}
int solve() {
  sort(processed_sub + 1, processed_sub + 1 + processed_sub_num,
       [&](pair<int, int> a, pair<int, int> b) {
         return a.first + a.second < b.first + b.second;
       });
  for (auto i = 1; i <= processed_sub_num; i++) {
    for (auto j = r; j >= max(processed_sub[i].first, -processed_sub[i].second);
         j--) {
      dp[j] = max(dp[j], dp[j + processed_sub[i].second] + 1);
    }
  }
  return *max_element(dp, dp + maxr);
}
int main() {
  input_preprocess();
  puts(solve() + Num_of_positive == n ? "YES" : "NO");
  return 0;
}
