#include <bits/stdc++.h>
using namespace std;
long long n, m, x, y, a, b;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  cin >> n >> m >> x >> y >> a >> b;
  long long t, u = gcd(a, b);
  a /= u;
  b /= u;
  if (m / b > n / a) {
    t = a;
    a = (n / t) * a;
    b = (n / t) * b;
  } else {
    t = b;
    a = (m / t) * a;
    b = (m / t) * b;
  }
  long double solx = x, soly = y;
  if (a % 2) {
    solx += -0.5;
  }
  solx -= (long double)a / 2.0;
  if (b % 2) {
    soly += -0.5;
  }
  soly -= (long double)b / 2.0;
  if (solx + a > n) {
    solx = n - a;
  }
  if (solx < 0) {
    solx = 0;
  }
  if (soly + b > m) {
    soly = m - b;
  }
  if (soly < 0) {
    soly = 0;
  }
  cout << (long long)solx << " " << (long long)soly << " "
       << (long long)solx + a << " " << (long long)soly + b << endl;
}
