#include <bits/stdc++.h>
using namespace std;
long n, m, x, y, a, b, xx1, xx2, yy1, yy2;
long g, sm;
long gcd(long a, long b) {
  long t;
  if (a <= b) {
    t = a;
    a = b;
    b = t;
  }
  while (b > 0) {
    t = a % b;
    a = b;
    b = t;
  }
  return a;
}
int main() {
  scanf("%ld %ld", &n, &m);
  scanf("%ld %ld", &x, &y);
  scanf("%ld %ld", &a, &b);
  g = gcd(a, b);
  a /= g;
  b /= g;
  sm = min(n / a, m / b);
  a *= sm;
  b *= sm;
  if (a / 2 >= x)
    xx1 = 0;
  else if (n - a / 2 <= x)
    xx1 = n - a;
  else
    xx1 = x + (a / 2) - a;
  if (b / 2 >= y)
    yy1 = 0;
  else if (m - b / 2 <= y)
    yy1 = m - b;
  else
    yy1 = y + (b / 2) - b;
  xx2 = xx1 + a;
  yy2 = yy1 + b;
  printf("%ld %ld ", xx1, yy1);
  printf("%ld %ld\n", xx2, yy2);
  return 0;
}
