#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) {
  int mod;
  while (mod = a % b) {
    a = b;
    b = mod;
  }
  return b;
}
int n, m, x, y, a, b;
int main() {
  while (scanf("%d%d%d%d%d%d", &n, &m, &x, &y, &a, &b) != EOF) {
    int gcd = GCD(a, b);
    a /= gcd;
    b /= gcd;
    int mul = min(n / a, m / b);
    int l = mul * a, h = mul * b;
    int minx = x - (l + 1) / 2, maxx = x + l / 2, miny = y - (h + 1) / 2,
        maxy = y + h / 2;
    if (minx < 0) {
      maxx -= minx;
      minx = 0;
    }
    if (maxx > n) {
      minx -= (maxx - n);
      maxx = n;
    }
    if (miny < 0) {
      maxy -= miny;
      miny = 0;
    }
    if (maxy > m) {
      miny -= (maxy - m);
      maxy = m;
    }
    printf("%d %d %d %d\n", minx, miny, maxx, maxy);
  }
}
