func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2005;   int n, m, x[N], y[N], xx[N], yy[N], num[N][N], vis[N * N], cur, pre[N * N];   vector<int> v[N * N];   using pii = pair<int, int>;   vector<pair<int, pii>> process(vector<pair<int, pii>> q) {     sort(q.begin(), q.end());     vector<pair<int, pii>> ret;     for (int i = 0; i < int(q.size()); i++) {       int l = q[i].second.first, r = q[i].second.second, j = i + 1;       while (j < int(q.size()) && q[i].first == q[j].first) {         if (q[j].second.first > r) {           ret.push_back({q[i].first, {l, r}});           l = q[j].second.first;           r = q[j].second.second;         } else           r = max(r, q[j].second.second);         ++j;       }       ret.push_back({q[i].first, {l, r}});       i = j - 1;     }     return ret;   }   bool in(int a, pii y) { return a >= y.first && a <= y.second; }   bool check(int mid) {     mid *= 2;     vector<pair<int, pii>> a, b;     for (int i = 1; i <= n; i++) b.push_back({x[i], {y[i] - mid, y[i] + mid}});     for (int i = 1; i <= m; i++) a.push_back({yy[i], {xx[i] - mid, xx[i] + mid}});     a = process(a);     b = process(b);     for (int i = 0; i < int(a.size()); i++)       for (int j = 0; j < int(b.size()); j++) num[i][j] = -1;     int idx = 0;     for (int i = 0; i < n * m; i++) v[i].clear();     for (int i = 0; i < int(a.size()); i++) {       int lst = -1;       for (int j = 0; j < int(b.size()); j++)         if (in(a[i].first, b[j].second) && in(b[j].first, a[i].second)) {           num[i][j] = idx++;           if (lst != -1) v[lst].push_back(idx - 1), v[idx - 1].push_back(lst);           lst = idx - 1;         }     }     for (int i = 0; i < int(b.size()); i++) {       int lst = -1;       for (int j = 0; j < int(a.size()); j++)         if (in(a[j].first, b[i].second) && in(b[i].first, a[j].second)) {           if (lst != -1) v[lst].push_back(num[j][i]), v[num[j][i]].push_back(lst);           lst = num[j][i];         }     }     ++cur;     for (int i = 0; i < idx; i++)       if (vis[i] != cur) {         queue<int> q;         q.push(i);         pre[i] = -1;         vis[i] = cur;         while (!q.empty()) {           int nd = q.front();           q.pop();           for (auto &i : v[nd]) {             if (vis[i] != cur)               q.push(i), vis[i] = cur, pre[i] = nd;             else if (pre[nd] != i)               return 1;           }         }       }     return 0;   }   int main() {     ios::sync_with_stdio(false);     cin >> n >> m;     int t1, t2;     for (int i = 1; i <= n; i++) cin >> t1 >> t2, x[i] = t1 + t2, y[i] = t1 - t2;     for (int i = 1; i <= m; i++)       cin >> t1 >> t2, xx[i] = t1 + t2, yy[i] = t1 - t2;     int l = 1, r = 1000000000, ans = -1;     while (l <= r) {       int mid = (l + r) >> 1;       if (check(mid))         ans = mid, r = mid - 1;       else         l = mid + 1;     }     if (ans == -1)       cout <<  Poor Sereja!  << endl;     else       cout << ans << endl;     return 0;   }   