func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, i, j, a, b;   inline bool valid(int x, int y, int &mx) {     if (!(x % a) && !(y % b)) {       int a1 = x / a;       int b1 = y / b;       if (!((a1 + b1) % 2)) {         if (!a1 && b1 && n <= a || !b1 && a1 && m <= b) return false;         int r = a1 > b1 ? a1 : b1;         if (mx == -1 || mx > r) {           mx = r;           return true;         }       }     }     return false;   }   int main() {     cin >> n >> m >> i >> j >> a >> b;     int x, y, d = -1;     x = i - 1;     y = m - j;     valid(x, y, d);     x = n - i;     y = j - 1;     valid(x, y, d);     x = n - i;     y = m - j;     valid(x, y, d);     x = i - 1;     y = j - 1;     valid(x, y, d);     if (d == -1)       cout <<  Poor Inna and pony!  << endl;     else       cout << d << endl;     return 0;   }   