func_code_string: #include <bits/stdc++.h>   using namespace std;   const int Maxn = 200005;   int n, m;   long long ans[Maxn];   struct Segment {     long long l, r;     int pos;   } A[Maxn], land[Maxn];   bool cmp(const Segment &a, const Segment &b) {     return a.l < b.l || a.l == b.l && a.r < b.r;   }   struct node {     int pos;     long long val;     node() {}     node(int _pos, long long _val) {       pos = _pos;       val = _val;     }   } p[Maxn];   bool operator<(node a, node b) { return a.val > b.val; }   bool cmp2(const node &a, const node &b) { return a.val < b.val; }   priority_queue<node> H;   int Get() {     char ch;     int v = 0;     bool f = false;     while (!isdigit(ch = getchar()))       if (ch ==  - ) f = true;     v = ch - 48;     while (isdigit(ch = getchar())) v = v * 10 + ch - 48;     if (f)       return -v;     else       return v;   }   int main() {     n = Get(), m = Get();     for (int i = 1; i <= n; i++) scanf( %I64d%I64d , &land[i].l, &land[i].r);     for (int i = 1; i <= m; i++) scanf( %I64d , &p[i].val), p[i].pos = i;     for (int i = 1; i <= n - 1; i++)       A[i].l = land[i + 1].l - land[i].r, A[i].r = land[i + 1].r - land[i].l,       A[i].pos = i;     n--;     sort(A + 1, A + 1 + n, cmp);     sort(p + 1, p + 1 + m, cmp2);     if (m < n) {       puts( No );       return 0;     }     long long mx = 0;     for (int i = 1, j = 1; i <= m; i++) {       while (A[j].l <= p[i].val && j <= n) H.push(node(A[j].pos, A[j].r)), j++;       while (!H.empty() && H.top().val < p[i].val) H.pop();       if (!H.empty()) {         node tmp = H.top();         ans[tmp.pos] = p[i].pos;         H.pop();       }     }     bool flag = true;     for (int i = 1; i <= n; i++)       if (ans[i] == 0) flag = false;     if (flag) {       puts( Yes );       for (int i = 1; i <= n - 1; i++) printf( %d  , ans[i]);       printf( %d n , ans[n]);     } else       puts( No );     return 0;   }   