Problem: Petya has recently started working as a programmer in the IT city company that develops computer games.

Besides game mechanics implementation to create a game it is necessary to create tool programs that can be used by game designers to create game levels. Petya's first assignment is to create a tool that allows to paint different arrows on the screen.

A user of this tool will choose a point on the screen, specify a vector (the arrow direction) and vary several parameters to get the required graphical effect. In the first version of the program Petya decided to limit parameters of the arrow by the following: a point with coordinates (px, py), a nonzero vector with coordinates (vx, vy), positive scalars a, b, c, d, a > c.

The produced arrow should have the following properties. The arrow consists of a triangle and a rectangle. The triangle is isosceles with base of length a and altitude of length b perpendicular to the base. The rectangle sides lengths are c and d. Point (px, py) is situated in the middle of the triangle base and in the middle of side of rectangle that has length c. Area of intersection of the triangle and the rectangle is zero. The direction from (px, py) point to the triangle vertex opposite to base containing the point coincides with direction of (vx, vy) vector.

Enumerate the arrow points coordinates in counter-clockwise order starting from the tip.

<image>

Input

The only line of the input contains eight integers px, py, vx, vy ( - 1000 ≤ px, py, vx, vy ≤ 1000, vx2 + vy2 > 0), a, b, c, d (1 ≤ a, b, c, d ≤ 1000, a > c).

Output

Output coordinates of the arrow points in counter-clockwise order. Each line should contain two coordinates, first x, then y. Relative or absolute error should not be greater than 10 - 9.

Examples

Input

8 8 0 2 8 3 4 5


Output

8.000000000000 11.000000000000
4.000000000000 8.000000000000
6.000000000000 8.000000000000
6.000000000000 3.000000000000
10.000000000000 3.000000000000
10.000000000000 8.000000000000
12.000000000000 8.000000000000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long double pie = 3.141592653589793238462643383279;
long long mod = 1e9 + 7;
struct point {
  long double x, y;
};
vector<vector<long long>> mat_mul(vector<vector<long long>> mat1,
                                  vector<vector<long long>> mat2) {
  vector<vector<long long>> ret;
  for (long long i = 0; i < (long long)2; ++i) {
    vector<long long> xx;
    for (long long j = 0; j < (long long)2; ++j) {
      long long r = 0;
      for (long long k = 0; k < (long long)2; ++k)
        r = (r + (mat1[i][k] * mat2[k][j]) % mod) % mod;
      xx.push_back(r % mod);
    }
    ret.push_back(xx);
  }
  return ret;
}
vector<vector<long long>> mat_exp(vector<vector<long long>> mat, long long p) {
  vector<vector<long long>> iden = {{1, 0}, {0, 1}};
  while (p != 0) {
    if (p & 1) iden = mat_mul(iden, mat);
    p /= 2;
    mat = mat_mul(mat, mat);
  }
  return iden;
}
long long myexp(long long p) {
  p++;
  long long r = 1;
  long long val = 2;
  while (p != 0) {
    if (p & 1) {
      r *= val;
    }
    val *= val;
    p /= 2;
  }
  r -= 2;
  return r;
}
long long fact[2000005];
long long infact[2000005];
long long inv(long long a) {
  long long y = mod - 2;
  long long r = 1;
  while (y != 0) {
    if (y & 1) {
      r *= a;
      r %= mod;
    }
    y /= 2;
    a *= a;
    a %= mod;
  }
  return r;
}
long long po(long long a, long long y) {
  long long r = 1;
  while (y != 0) {
    if (y & 1) {
      r *= a;
      r %= mod;
    }
    y /= 2;
    a *= a;
    a %= mod;
  }
  return r;
}
void facto() {
  fact[0] = 1;
  for (long long i = 1; i < (long long)2000005; ++i) {
    fact[i] = i * fact[i - 1];
    fact[i] %= mod;
  }
  for (long long i = 0; i < (long long)2000005; ++i) infact[i] = inv(fact[i]);
}
long long nck(long long n, long long k) {
  if (k < 0 || k > n) return 0;
  long long ret = fact[n];
  ret *= infact[k];
  ret %= mod;
  ret *= infact[n - k];
  ret %= mod;
  return ret;
}
void mymul(long long arr[], long long num) {
  long long carry = 0;
  for (long long i = 0; i < (long long)100; ++i) {
    arr[i] = arr[i] * num + carry;
    carry = arr[i] / 10;
    arr[i] %= 10;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  point begin, direc;
  cin >> begin.x >> begin.y >> direc.x >> direc.y;
  long double mag = sqrt(pow(direc.x, 2) + pow(direc.y, 2));
  direc.x /= mag;
  direc.y /= mag;
  long double a, b, c, d;
  cin >> a >> b >> c >> d;
  long double inx = direc.x * b;
  long double iny = direc.y * b;
  cout << setprecision(12) << inx + begin.x << " " << iny + begin.y << "\n";
  point new_slope;
  new_slope.x = (-1) * direc.y;
  new_slope.y = (+1) * direc.x;
  inx = new_slope.x * (a / 2);
  iny = new_slope.y * (a / 2);
  cout << setprecision(12) << inx + begin.x << " " << iny + begin.y << "\n";
  inx = new_slope.x * (c / 2);
  iny = new_slope.y * (c / 2);
  cout << setprecision(12) << inx + begin.x << " " << iny + begin.y << "\n";
  direc.x *= (-1);
  direc.y *= (-1);
  inx = direc.x * (d);
  iny = direc.y * (d);
  cout << setprecision(12) << new_slope.x * (c / 2) + begin.x + inx << " "
       << new_slope.y * (c / 2) + begin.y + iny << "\n";
  cout << setprecision(12)
       << new_slope.x * (c / 2) + begin.x + inx + new_slope.x * (-c) << " "
       << new_slope.y * (c / 2) + begin.y + iny + new_slope.y * (-c) << "\n";
  new_slope.x *= (-1);
  new_slope.y *= (-1);
  inx = new_slope.x * (c / 2);
  iny = new_slope.y * (c / 2);
  cout << setprecision(12) << inx + begin.x << " " << iny + begin.y << "\n";
  inx = new_slope.x * (a / 2);
  iny = new_slope.y * (a / 2);
  cout << setprecision(12) << inx + begin.x << " " << iny + begin.y << "\n";
  return 0;
}