#include <bits/stdc++.h>
using namespace std;
double eps = 1e-7;
long long dblcmp(double a) {
  if (a > eps) return 1;
  if (a < -eps) return -1;
  return 0;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<long long> r;
double res = 1e100;
long long n, m, x, y, a, b;
void check(long long x1, long long y1, long long x2, long long y2) {
  long long d = 0;
  if (x1 < 0) d = -x1;
  if (x2 > n) d = n - x2;
  x1 += d;
  x2 += d;
  d = 0;
  if (y1 < 0) d = -y1;
  if (y2 > m) d = m - y2;
  y1 += d;
  y2 += d;
  cerr << x1 << " " << y1 << " " << x2 << " " << y2 << endl;
  double x = (double)(x1 + x2) / 2, y = (double)(y1 + y2) / 2;
  double ans = ((x - ::x) * (x - ::x)) + ((y - ::y) * (y - ::y));
  long long size = 0x3f3f3f3f;
  size = min(size, (long long)floor((n - x) / (x2 - x)));
  size = min(size, (long long)floor((x) / (x - x1)));
  size = min(size, (long long)floor((m - y) / (y2 - y)));
  size = min(size, (long long)floor((y) / (y - y1)));
  x2 = (long long)(x + (x2 - x) * size);
  x1 = (long long)(x - (x - x1) * size);
  y2 = (long long)(y + (y2 - y) * size);
  y1 = (long long)(y - (y - y1) * size);
  vector<long long> tmp;
  tmp.push_back(x1);
  tmp.push_back(y1);
  tmp.push_back(x2);
  tmp.push_back(y2);
  if (dblcmp(ans - res) < 0) {
    res = ans;
    r = tmp;
  } else if (dblcmp(ans - res) == 0) {
    if (tmp < r) {
      r = tmp;
    }
  }
}
void solve(long long a, long long b) {
  long long x = ::x * 2, y = ::y * 2;
  if (a & 1) x--;
  if (b & 1) y--;
  long long i, j;
  for (i = 0; i <= 2; i += 2) {
    for (j = 0; j <= 2; j += 2) {
      check((x + i - a) / 2, (y + i - b) / 2, (x + i + a) / 2, (y + i + b) / 2);
    }
  }
}
int main() {
  cin >> n >> m >> x >> y >> a >> b;
  long long d = gcd(a, b);
  a /= d;
  b /= d;
  long long size = min(n / a, m / b);
  a *= size;
  b *= size;
  long long i, j;
  solve(a, b);
  for (i = 0; i < 4; i++) {
    cout << r[i] << " ";
  }
  cout << endl;
  return 0;
}
