#include <bits/stdc++.h>
template <typename T>
T gcd(T a, T b) {
  if (b <= a) std::swap(a, b);
  while (a) {
    T a0 = a;
    a = b % a0;
    b = a0;
  }
  return b;
}
using namespace std;
int main() {
  long long w, h, x, y, a, b;
  {
    cin >> w >> h >> x >> y >> a >> b;
    long long d = gcd(a, b);
    a /= d;
    b /= d;
  }
  long long t = min(w / a, h / b);
  long long p = x, q = y;
  auto x1 = [&]() -> long long { return p - (a * t + 1) / 2; };
  auto y1 = [&]() -> long long { return q - (b * t + 1) / 2; };
  auto x2 = [&]() -> long long { return p + a * t / 2; };
  auto y2 = [&]() -> long long { return q + b * t / 2; };
  p -= min(0ll, x1());
  q -= min(0ll, y1());
  p -= max(0ll, x2() - w);
  q -= max(0ll, y2() - h);
  cout << x1() << " " << y1() << " " << x2() << " " << y2() << endl;
  return 0;
}
