#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int inf = (1 << 29) - 1;
const double eqs = 1e-8;
const int N = 1000003;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n, m, x, y, a, b;
  scanf("%d%d%d%d%d%d", &n, &m, &x, &y, &a, &b);
  int lx, ly, k;
  int gcdd = gcd(a, b);
  a /= gcdd;
  b /= gcdd;
  k = min(n / a, m / b);
  lx = a * k;
  ly = b * k;
  int xx, xy;
  if (lx % 2 == 0)
    xx = (x - lx / 2);
  else {
    if (x > 0)
      xx = (x - lx / 2 - 1);
    else
      xx = (x - lx / 2);
  }
  if (ly % 2 == 0)
    xy = (y - ly / 2);
  else {
    if (y > 0)
      xy = (y - ly / 2 - 1);
    else
      xy = y - ly / 2;
  }
  if (xx < 0) xx = 0;
  if (xx + lx > n) xx = n - lx;
  if (xy < 0) xy = 0;
  if (xy + ly > m) xy = m - ly;
  printf("%d %d %d %d\n", xx, xy, xx + lx, xy + ly);
  return 0;
}
