#include <bits/stdc++.h>
using namespace std;
int GCD(int x, int y) {
  if (!y) return x;
  return GCD(y, x % y);
}
int n, m, x, y, a, b, gcd;
int main() {
  scanf("%d%d%d%d%d%d", &n, &m, &x, &y, &a, &b);
  gcd = GCD(a, b);
  a /= gcd;
  b /= gcd;
  int mult = min(n / a, m / b);
  int x2 = x + (mult * a) / 2;
  int x1 = x2 - (mult * a);
  int y2 = y + (mult * b) / 2;
  int y1 = y2 - (mult * b);
  if (x1 < 0) {
    x2 += (-x1);
    x1 = 0;
  }
  if (x2 > n) {
    x1 -= (x2 - n);
    x2 = n;
  }
  if (y1 < 0) {
    y2 += (-y1);
    y1 = 0;
  }
  if (y2 > m) {
    y1 -= (y2 - m);
    y2 = m;
  }
  printf("%d %d %d %d\n", x1, y1, x2, y2);
  return 0;
}
