#include<cstdio>
#include<cassert>
#include<iostream>
using namespace std;

int main()
{
    freopen("stair.in", "r", stdin);
    freopen("stair.out", "w", stdout);
    int x0, y0, x1, y1, a, b;
    cin >> x0 >> y0 >> x1 >> y1 >> a >> b;
    assert(-1000 <= x0 && x0 <= 1000);
    assert(-1000 <= y0 && y0 <= 1000);
    assert(-1000 <= x1 && x1 <= 1000);
    assert(-1000 <= y1 && y1 <= 1000);
    assert(a <= 1000);
    assert(b <= 1000);
    int w, h;
    w = max(x0 - x1, x1 - x0);
    h = max(y0 - y1, y1 - y0);
    int k = w / a;
    if (k == 0 || h > (long long)k * b)
    {
        cout << -1 << endl;
        return 0;
    }
    cout << w << ' ' << k << endl;
    cout << h << ' ' << k << endl;
    return 0;
}