#include <bits/stdc++.h>
using namespace std;
long long Set(long long N, long long pos) { return N = N | (1 << pos); }
long long reset(long long N, long long pos) { return N = N & ~(1 << pos); }
bool check(long long N, long long pos) { return (bool)(N & (1 << pos)); }
void CI(int &_x) { scanf("%d", &_x); }
void CO(long long &_x) { cout << _x; }
template <typename T>
void getarray(T a[], long long n) {
  for (long long i = 0; i < n; i++) cin >> a[i];
}
template <typename T>
void prLLIarray(T a[], long long n) {
  for (long long i = 0; i < n - 1; i++) cout << a[i] << " ";
  cout << a[n - 1] << endl;
}
const double EPS = 1e-9;
const long long INF = 0x7f7f7f7f;
long long dr8[8] = {1, -1, 0, 0, 1, -1, -1, 1};
long long dc8[8] = {0, 0, -1, 1, 1, 1, -1, -1};
long long dr4[4] = {0, 0, 1, -1};
long long dc4[4] = {-1, 1, 0, 0};
long long kn8r[8] = {1, 2, 2, 1, -1, -2, -2, -1};
long long kn8c[8] = {2, 1, -1, -2, -2, -1, 1, 2};
struct rectangle {
  int x1, y1, x2, y2;
  rectangle() {}
  rectangle(int x1, int y1, int x2, int y2) : x1(x1), y1(y1), x2(x2), y2(y2) {}
};
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
rectangle ans;
int n, m, x, y, a, b;
void make_rectangle() {
  int len_x = a, len_y = b;
  int x1 = floor((1.0 * x) - ((a * 1.0) / 2.0));
  int x2 = floor((1.0 * x) + ((a * 1.0) / 2.0));
  int y1 = floor((1.0 * y) - ((b * 1.0) / 2.0));
  int y2 = floor((1.0 * y) + ((b * 1.0) / 2.0));
  ans = rectangle(x1, y1, x2, y2);
}
int main() {
  cin >> n >> m >> x >> y >> a >> b;
  int g = gcd(a, b);
  a /= g, b /= g;
  int mult = min(n / a, m / b);
  a *= mult, b *= mult;
  make_rectangle();
  if (ans.x1 < 0) {
    int add = abs(ans.x1);
    ans.x1 += add, ans.x2 += add;
  }
  if (ans.x2 > n) {
    int substract = ans.x2 - n;
    ans.x2 -= substract;
    ans.x1 -= substract;
  }
  if (ans.y1 < 0) {
    int add = abs(ans.y1);
    ans.y1 += add, ans.y2 += add;
  }
  if (ans.y2 > m) {
    int substract = ans.y2 - m;
    ans.y2 -= substract;
    ans.y1 -= substract;
  }
  cout << ans.x1 << " " << ans.y1 << " " << ans.x2 << " " << ans.y2 << "\n";
}

### Prompt

Please provide a CPP coded solution to the problem described below:

You are given a rectangle grid. That grid's size is n × m. Let's denote the coordinate system on the grid. So, each point on the grid will have coordinates — a pair of integers (x, y) (0 ≤ x ≤ n, 0 ≤ y ≤ m).

Your task is to find a maximum sub-rectangle on the grid (x1, y1, x2, y2) so that it contains the given point (x, y), and its length-width ratio is exactly (a, b). In other words the following conditions must hold: 0 ≤ x1 ≤ x ≤ x2 ≤ n, 0 ≤ y1 ≤ y ≤ y2 ≤ m, <image>.

The sides of this sub-rectangle should be parallel to the axes. And values x1, y1, x2, y2 should be integers.

<image>

If there are multiple solutions, find the rectangle which is closest to (x, y). Here "closest" means the Euclid distance between (x, y) and the center of the rectangle is as small as possible. If there are still multiple solutions, find the lexicographically minimum one. Here "lexicographically minimum" means that we should consider the sub-rectangle as sequence of integers (x1, y1, x2, y2), so we can choose the lexicographically minimum one.

Input

The first line contains six integers n, m, x, y, a, b (1 ≤ n, m ≤ 109, 0 ≤ x ≤ n, 0 ≤ y ≤ m, 1 ≤ a ≤ n, 1 ≤ b ≤ m).

Output

Print four integers x1, y1, x2, y2, which represent the founded sub-rectangle whose left-bottom point is (x1, y1) and right-up point is (x2, y2).

Examples

Input

9 9 5 5 2 1


Output

1 3 9 7


Input

100 100 52 50 46 56


Output

17 8 86 92

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long Set(long long N, long long pos) { return N = N | (1 << pos); }
long long reset(long long N, long long pos) { return N = N & ~(1 << pos); }
bool check(long long N, long long pos) { return (bool)(N & (1 << pos)); }
void CI(int &_x) { scanf("%d", &_x); }
void CO(long long &_x) { cout << _x; }
template <typename T>
void getarray(T a[], long long n) {
  for (long long i = 0; i < n; i++) cin >> a[i];
}
template <typename T>
void prLLIarray(T a[], long long n) {
  for (long long i = 0; i < n - 1; i++) cout << a[i] << " ";
  cout << a[n - 1] << endl;
}
const double EPS = 1e-9;
const long long INF = 0x7f7f7f7f;
long long dr8[8] = {1, -1, 0, 0, 1, -1, -1, 1};
long long dc8[8] = {0, 0, -1, 1, 1, 1, -1, -1};
long long dr4[4] = {0, 0, 1, -1};
long long dc4[4] = {-1, 1, 0, 0};
long long kn8r[8] = {1, 2, 2, 1, -1, -2, -2, -1};
long long kn8c[8] = {2, 1, -1, -2, -2, -1, 1, 2};
struct rectangle {
  int x1, y1, x2, y2;
  rectangle() {}
  rectangle(int x1, int y1, int x2, int y2) : x1(x1), y1(y1), x2(x2), y2(y2) {}
};
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
rectangle ans;
int n, m, x, y, a, b;
void make_rectangle() {
  int len_x = a, len_y = b;
  int x1 = floor((1.0 * x) - ((a * 1.0) / 2.0));
  int x2 = floor((1.0 * x) + ((a * 1.0) / 2.0));
  int y1 = floor((1.0 * y) - ((b * 1.0) / 2.0));
  int y2 = floor((1.0 * y) + ((b * 1.0) / 2.0));
  ans = rectangle(x1, y1, x2, y2);
}
int main() {
  cin >> n >> m >> x >> y >> a >> b;
  int g = gcd(a, b);
  a /= g, b /= g;
  int mult = min(n / a, m / b);
  a *= mult, b *= mult;
  make_rectangle();
  if (ans.x1 < 0) {
    int add = abs(ans.x1);
    ans.x1 += add, ans.x2 += add;
  }
  if (ans.x2 > n) {
    int substract = ans.x2 - n;
    ans.x2 -= substract;
    ans.x1 -= substract;
  }
  if (ans.y1 < 0) {
    int add = abs(ans.y1);
    ans.y1 += add, ans.y2 += add;
  }
  if (ans.y2 > m) {
    int substract = ans.y2 - m;
    ans.y2 -= substract;
    ans.y1 -= substract;
  }
  cout << ans.x1 << " " << ans.y1 << " " << ans.x2 << " " << ans.y2 << "\n";
}

```