#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long n, m, cx, cy, disx, disy;
long long get_max() { return min(n / disx, m / disy); }
int main() {
  cin >> n >> m >> cx >> cy >> disx >> disy;
  long long G = gcd(disx, disy);
  disx /= G, disy /= G;
  long long factor = get_max();
  disx *= factor;
  disy *= factor;
  long long x1 = cx - (disx + 1) / 2, x2 = cx + disx / 2;
  long long y1 = cy - (disy + 1) / 2, y2 = cy + disy / 2;
  if (x1 < 0) x2 += abs(x1), x1 = 0;
  if (y1 < 0) y2 += abs(y1), y1 = 0;
  if (x2 > n) x1 -= abs(x2 - n), x2 = n;
  if (y2 > m) y1 -= abs(y2 - m), y2 = m;
  cout << x1 << " " << y1 << " " << x2 << " " << y2 << endl;
  return 0;
}
