func_code_string: #include <bits/stdc++.h>   using namespace std;   struct point {     int x, y;     bool operator<(const point &other) const {       return x <= other.x && y <= other.y;     }   };   map<int, set<point> > m;   int main() {     int n;     scanf( %d , &n);     for (int i = 0; i < n; i++) {       point p;       scanf( %d %d , &p.x, &p.y);       m[p.y - p.x].insert(p);     }     vector<point> v;     bool ok = true;     for (int i = 0; i < n; i++) {       int d;       scanf( %d , &d);       if (m.find(d) == m.end())         ok = false;       else if (m[d].size() == 0)         ok = false;       else {         v.push_back(*m[d].begin());         m[d].erase(m[d].begin());       }     }     if ((int)v.size() != n || !ok) {       printf( NO );       return 0;     }     for (int i = 1; i < v.size(); i++) {       if (v[i] < v[i - 1]) {         printf( NO n );         return 0;       }     }     printf( YES n );     for (int i = 0; i < v.size(); i++) {       printf( %d %d n , v[i].x, v[i].y);     }     return 0;   }   