#include <bits/stdc++.h>
int n, m, x, y, a, b;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  scanf("%d%d%d%d%d%d", &n, &m, &x, &y, &a, &b);
  int c = gcd(a, b);
  a /= c, b /= c;
  int mr = n / a, mc = m / b;
  if (mr > mc)
    a *= mc, b *= mc;
  else
    a *= mr, b *= mr;
  int midr = (a + 1) >> 1, midc = (b + 1) >> 1;
  int lx = x - midr, ly = y - midc;
  int ux = a + lx, uy = b + ly;
  if (lx < 0) ux -= lx, lx = 0;
  if (ly < 0) uy -= ly, ly = 0;
  if (ux > n) lx -= ux - n, ux = n;
  if (uy > m) ly -= uy - m, uy = m;
  printf("%d %d %d %d\n", lx, ly, ux, uy);
  return 0;
}
