#include <bits/stdc++.h>
int gcd(int x, int y) {
  int t;
  if (x < y) {
    t = x;
    x = y;
    y = t;
  }
  while (y) {
    t = x % y;
    x = y;
    y = t;
  }
  return x;
}
int main() {
  int nx, ny, x, y, a, b, x1, y1, x2, y2, gg;
  long long w, h;
  scanf("%d%d%d%d%d%d", &nx, &ny, &x, &y, &a, &b);
  gg = gcd(a, b);
  a /= gg;
  b /= gg;
  w = nx;
  h = ny;
  while (w * b != h * a) {
    h = w * b / a;
    if (h > ny) h = ny;
    h -= h % b;
    w = h * a / b;
    if (w > nx) w = nx;
    w -= w % a;
  }
  x1 = x - (w + 1) / 2;
  y1 = y - (h + 1) / 2;
  x2 = x1 + w;
  y2 = y1 + h;
  if (x1 < 0) x2 -= x1, x1 = 0;
  if (y1 < 0) y2 -= y1, y1 = 0;
  if (x2 > nx) x1 -= (x2 - nx), x2 = nx;
  if (y2 > ny) y1 -= (y2 - ny), y2 = ny;
  printf("%d %d %d %d\n", x1, y1, x2, y2);
  return 0;
}
