#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[6], ans = INT_MAX;
  for (int i = 0; i < 6; ++i) cin >> a[i];
  if ((a[2] - 1) % a[4] == 0 && (a[3] - 1) % a[5] == 0 &&
      ((a[2] - 1) / a[4] - (a[3] - 1) / a[5]) % 2 == 0)
    ans = min(ans, max((a[2] - 1) / a[4], (a[3] - 1) / a[5]));
  if ((a[2] - a[0]) % a[4] == 0 && (a[3] - 1) % a[5] == 0 &&
      ((a[2] - a[0]) / a[4] - (a[3] - 1) / a[5]) % 2 == 0)
    ans = min(ans, max(abs(a[2] - a[0]) / a[4], (a[3] - 1) / a[5]));
  if ((a[2] - 1) % a[4] == 0 && (a[3] - a[1]) % a[5] == 0 &&
      ((a[2] - 1) / a[4] - (a[3] - a[1]) / a[5]) % 2 == 0)
    ans = min(ans, max((a[2] - 1) / a[4], abs(a[3] - a[1]) / a[5]));
  if ((a[2] - a[0]) % a[4] == 0 && (a[3] - a[1]) % a[5] == 0 &&
      ((a[2] - a[0]) / a[4] - (a[3] - a[1]) / a[5]) % 2 == 0)
    ans = min(ans, max(abs(a[2] - a[0]) / a[4], abs(a[3] - a[1]) / a[5]));
  if (ans && ((a[2] + a[4] > a[0] && a[2] - a[4] < 1) ||
              (a[3] + a[5] > a[1] && a[3] - a[5] < 1)))
    ans = INT_MAX;
  if (ans == INT_MAX)
    cout << "Poor Inna and pony!";
  else
    cout << ans;
}
