func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m;   long long l[200020], r[200020];   struct node {     long long x, y, p;   } a[200020];   long long ans[200020];   struct bridge {     long long p, v;   };   struct Compare {     bool operator()(const bridge& a, const bridge& b) const {       if (a.v < b.v || (a.v == b.v && a.p < b.p))         return true;       else         return false;     }   };   set<bridge, Compare> b;   bool cmp(node a, node b) {     if (a.x > b.x) return true;     if (a.x < b.x) return false;     if (a.y > b.y) return true;     return false;   }   int main() {     scanf( %d%d , &n, &m);     for (int i = 1; i <= n; i++) scanf( %lld%lld , &l[i], &r[i]);     long long j;     for (int i = 1; i <= m; i++) {       bridge tmp;       scanf( %lld , &j);       tmp.v = j;       tmp.p = i;       b.insert(tmp);     }     if (m < n - 1) {       printf( No n );       return 0;     }     for (int i = 1; i < n; i++) {       a[i].x = l[i + 1] - r[i];       a[i].y = r[i + 1] - l[i];       a[i].p = i;     }     sort(a + 1, a + n, cmp);     bool ok = true;     set<bridge, Compare>::iterator iter;     bridge tmp;     for (int i = 1; i < n; i++) {       tmp.v = a[i].y + 1;       tmp.p = -1;       iter = b.lower_bound(tmp);       if (iter == b.begin()) {         ok = false;         break;       }       iter--;       if (iter == b.end() || iter->v < a[i].x) {         ok = false;         break;       } else {         ans[a[i].p] = iter->p;         b.erase(iter);       }     }     if (ok) {       printf( Yes n );       for (int i = 1; i < n; i++) printf( %lld  , ans[i]);     } else       printf( No n );     return 0;   }   