#include <bits/stdc++.h>
using namespace std;
inline int maxx(const int &a, const int &b) {
  if (a > b) return a;
  return b;
}
inline int minn(const int &a, const int &b) {
  if (a < b) return a;
  return b;
}
int n, m, x, y, a, b, c, d, e, f, g, h, i, j, k, l, ax, ay, bx, by, zxx, zxy;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  scanf("%d%d%d%d%d%d", &n, &m, &x, &y, &a, &b);
  h = gcd(a, b);
  a = a / h;
  b = b / h;
  c = n / a;
  d = m / b;
  if (c < d)
    e = c;
  else
    e = d;
  f = e * a;
  g = e * b;
  zxx = f / 2;
  if (zxx * 2 < f) zxx++;
  zxy = g / 2;
  if (zxy * 2 < g) zxy++;
  ax = x - zxx;
  ay = y - zxy;
  bx = ax + f;
  by = ay + g;
  if (ax < 0) {
    bx -= ax;
    ax = 0;
  }
  if (ay < 0) {
    by -= ay;
    ay = 0;
  }
  if (bx > n) {
    ax = ax - (bx - n);
    bx = n;
  }
  if (by > m) {
    ay = ay - (by - m);
    by = m;
  }
  printf("%d %d %d %d", ax, ay, bx, by);
  return 0;
}
