func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 200000 + 123;   using LL = long long;   using PLL = pair<LL, LL>;   PLL lr[maxn], a[maxn];   LL ans[maxn];   deque<pair<LL, PLL>> itv;   priority_queue<PLL, vector<PLL>, greater<PLL>> Q;   LL n, m;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cin >> n >> m;     for (int i = 0; i < n; ++i) cin >> lr[i].first >> lr[i].second;     sort(lr, lr + n);     for (int i = 0; i < n - 1; ++i)       itv.emplace_back(lr[i + 1].first - lr[i].second,                        make_pair(lr[i + 1].second - lr[i].first, i));     sort(itv.begin(), itv.end());     for (int i = 0; i < m; ++i) {       LL t;       cin >> t;       a[i] = {t, i + 1};     }     sort(a, a + m);     bool flag(true);     for (int i = 0; i < m; ++i) {       while (!itv.empty() && itv[0].first <= a[i].first) {         Q.push(itv[0].second);         itv.pop_front();       }       LL r, id;       if (Q.empty()) continue;       tie(r, id) = Q.top();       Q.pop();       if (r < a[i].first) {         flag = false;         break;       }       ans[id] = a[i].second;     }     if (itv.empty() && flag) {       cout <<  Yes  << endl;       cout << ans[0];       for (int i = 1; i < n - 1; ++i) cout <<     << ans[i];       cout << endl;     } else       cout <<  No  << endl;     return 0;   }   