
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <bitset>
#include <vector>
#include <queue>
#include <memory.h>
#include <deque>
#include <iomanip>
#include <utility>
#include <string>
#include <ext/rope>
#include <iterator>
  
using namespace std;
using namespace __gnu_cxx;
  
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define sz size
#define scf scanf
#define prf printf       
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define gcd(a,b) __gcd(a,b)
#define print(x) prf("%d\n", x.sz()); for (int i = 0; i < x.sz(); i++) prf("%d ", x[i]);
#define getBit(x,i) ((x&(1<<i))!=0 ? 1 : 0)
#define For(i,n) for (int i = 0; i < n; ++i)
#define y1 aeogijnsrhjn
#define FOR(i,begin,end,move) for (int i = begin; i != end; i += move)
  
typedef long long ll;
  
const ll base = 1000000007LL;
const ll INF = 10000000000000LL;
 
int x1, y1, x2, y2, a, b;
 
int main()
{
    freopen("stair.in","r",stdin);
    freopen("stair.out","w",stdout);
    scf("%d%d%d%d%d%d", &x1, &y1, &x2, &y2, &a, &b);
    int dx = abs(x1 - x2);
    int dy = abs(y1 - y2);
    int toX, toY;
    toX = toY = -1;
    for (int i = a; i <= 1000000; i++)
        if (dx % i == 0)
        {
            toX = i;
            break;
        }
    b = min(b, 1000000);
    for (int i = 1; i <= b; i++)
        if (dy % i == 0)
        {
            toY = i;
            break;
        }
    if (toX == -1 || toY == -1)
        prf("-1\n");
    else prf("%d 1\n%d 1\n", toX, toY);     
    return 0;
}