#include <bits/stdc++.h>
using namespace std;
long long n, m, x, y, a, b, xx, yy, o, i;
long long gcd(long long p, long long q) {
  if (!q) return p;
  return gcd(q, p % q);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> x >> y >> a >> b;
  long long gg = gcd(max(a, b), min(a, b));
  a /= gg;
  b /= gg;
  long long c = n / a, d, e, f = m / b;
  d = c * b, c *= a, e = f * a, f *= b;
  if (e > c) swap(c, e), swap(d, f);
  if (c > n || d > m) c = e, d = f;
  xx = max(0ll, x - ((c + 1) / 2));
  yy = max(0ll, y - ((d + 1) / 2));
  o = xx + c;
  i = yy + d;
  if (o > n) xx -= o - n, o = n;
  if (i > m) yy -= i - m, i = m;
  cout << xx << " " << yy << " " << o << " " << i << endl;
  return 0;
}
