#include <bits/stdc++.h>
using namespace std;
long gcd(long a, long b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main(void) {
  long n, m;
  cin >> n >> m;
  long x, y;
  cin >> x >> y;
  long a, b;
  cin >> a >> b;
  long gcd_ab = gcd(a, b);
  a = a / gcd_ab;
  b = b / gcd_ab;
  long width = a * min(n / a, m / b);
  long height = b * min(n / a, m / b);
  long lx = x - (width + 1) / 2, ly = y - (height + 1) / 2;
  long hx = x + (width + 0) / 2, hy = y + (height + 0) / 2;
  if (lx < 0) {
    hx = hx - lx;
    lx = 0;
  }
  if (hx > n) {
    lx = lx - (hx - n);
    hx = n;
  }
  if (ly < 0) {
    hy = hy - ly;
    ly = 0;
  }
  if (hy > m) {
    ly = ly - (hy - m);
    hy = m;
  }
  cout << lx << " " << ly << " " << hx << " " << hy << endl;
  return 0;
}
