func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( O3 )   using namespace std;   struct Point {     int x;     int y;   };   int direction(Point a, Point b, Point c) {     return (c.x - a.x) * (b.y - a.y) - (c.y - a.y) * (b.x - a.x);   }   bool onsegment(Point a, Point b, Point c) {     return (min(a.x, b.x) <= c.x && max(a.x, b.x) >= c.x &&             min(a.y, b.y) <= c.y && max(a.y, b.y) >= c.y);   }   bool intersects(Point a, Point b, Point c, Point d) {     int d1 = direction(c, d, a), d2 = direction(c, d, b), d3 = direction(a, b, c),         d4 = direction(a, b, d);     if (d1 * d2 < 0 && d3 * d4 < 0) {       return true;     } else if (d1 == 0 && onsegment(c, d, a)) {       return true;     } else if (d2 == 0 && onsegment(c, d, b)) {       return true;     } else if (d3 == 0 && onsegment(a, b, c)) {       return true;     } else if (d4 == 0 && onsegment(a, b, d)) {       return true;     } else {       return false;     }   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     Point a[5], b[5];     for (int i = 0; i < 4; i++) {       int x, y;       cin >> x >> y;       a[i] = {x, y};     }     a[4] = a[0];     for (int i = 0; i < 4; i++) {       int x, y;       cin >> x >> y;       b[i] = {x, y};     }     b[4] = b[0];     for (int i = 0; i < 4; i++) {       if (intersects(b[i], b[i + 1], a[0], a[2]) ||           intersects(b[i], b[i + 1], a[1], a[3])) {         return cout <<  YES n , 0;       }     }     for (int i = 0; i < 4; i++) {       if (b[i].x >= min(min(a[0].x, a[1].x), min(a[2].x, a[3].x)) &&           b[i].x <= max(max(a[0].x, a[1].x), max(a[2].x, a[3].x)) &&           b[i].y >= min(min(a[0].y, a[1].y), min(a[2].y, a[3].y)) &&           b[i].y <= max(max(a[0].y, a[1].y), max(a[2].y, a[3].y))) {         return cout <<  YES n , 0;       }     }     for (int i = 0; i < 5; i++) {       a[i] = {a[i].x - a[i].y, a[i].x + a[i].y};       b[i] = {b[i].x - b[i].y, b[i].x + b[i].y};     }     for (int i = 0; i < 4; i++) {       if (a[i].x >= min(min(b[0].x, b[1].x), min(b[2].x, b[3].x)) &&           a[i].x <= max(max(b[0].x, b[1].x), max(b[2].x, b[3].x)) &&           a[i].y >= min(min(b[0].y, b[1].y), min(b[2].y, b[3].y)) &&           a[i].y <= max(max(b[0].y, b[1].y), max(b[2].y, b[3].y))) {         return cout <<  YES n , 0;       }     }     return cout <<  NO n , 0;   }   