#include <bits/stdc++.h>
using namespace std;
long long nod(long long a, long long b) {
  if (b > 0) return nod(b, a % b);
  return a;
}
int main() {
  long long n, m, x, y, a, b;
  cin >> n >> m >> x >> y >> a >> b;
  long long d = nod(a, b);
  a /= d;
  b /= d;
  long long dx, dy;
  if (n * b < a * m) {
    dx = n / a * a;
    dy = dx / a * b;
  } else if (n * b > a * m) {
    dy = m / b * b;
    dx = dy / b * a;
  } else {
    dx = n;
    dy = m;
  }
  long long x1, x2, y1, y2;
  if (2 * x < dx) {
    x1 = 0;
    x2 = dx;
  } else if (2 * (n - x) < dx) {
    x1 = n - dx;
    x2 = n;
  } else {
    x2 = x + dx / 2;
    x1 = x2 - dx;
  }
  if (2 * y < dy) {
    y1 = 0;
    y2 = dy;
  } else if (2 * (m - y) < dy) {
    y1 = m - dy;
    y2 = m;
  } else {
    y2 = y + dy / 2;
    y1 = y2 - dy;
  }
  cout << x1 << ' ' << y1 << ' ' << x2 << ' ' << y2;
  return 0;
}
