func_code_string: #include <bits/stdc++.h>   using namespace std;   int INF = 1000000005;   long long INFF = 1000000000000000005LL;   int main() {     long long s, n;     cin >> s >> n;     long long x, y;     vector<pair<long long, long long>> strengths;     for (long long i = 0; i < n; i++) {       cin >> x >> y;       strengths.push_back(make_pair(x, y));     }     sort(strengths.begin(), strengths.end());     bool win = true;     for (long long i = 0; i < n; i++) {       if (s <= strengths[i].first) {         win = false;         break;       }       s += strengths[i].second;     }     if (win) {       cout <<  YES             <<   n ;       ;     } else {       cout <<  NO             <<   n ;       ;     }     return 0;   }   