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;
using namespace std;
struct point {
  long double x;
  long double y;
  point() : x(0), y(0) {}
  point(const point& a) : x(a.x), y(a.y) {}
  point(long double a, long double b) : x(a), y(b) {}
  point operator-(const point& a) { return point(x - a.x, y - a.y); }
  bool operator<(const point& a) const { return x < a.x || y < a.y; }
};
struct vec {
  long double x;
  long double y;
  vec() : x(0), y(0) {}
  vec(long double a, long double b) : x(a), y(b) {}
  vec(const point& a, const point& b) : x(a.x - b.x), y(a.y - b.y) {}
  vec perp() { return vec(y, -x); }
  vec operator-(const vec& u) { return vec(x - u.x, y - u.y); }
  vec operator+(const vec& u) { return vec(x + u.x, y + u.y); }
  long double length2() { return (x * x + y * y); }
};
long long cross(const vec& u, const vec& v) { return u.x * v.y - u.y * v.x; }
struct line {
  vec v;
  long double c;
  point pa;
  point pb;
  line(const point& a, const point& b) : v(a, b), pa(a), pb(b) {
    vec v = v.perp();
    c = 0 - v.x * a.x - v.y * a.y;
  }
  bool isOnLine(const point& a) { return (a.x * v.x + a.y * v.y + c) == 0; }
  bool isOnSegment(const point& a) {
    vec sh = vec(a, pb), lo = vec(pa, pb), dif;
    dif = sh - lo;
    long double l = lo.length2();
    return isOnLine(a) && (sh.length2() <= l && dif.length2() <= l);
  }
};
vector<point> convex_hull(vector<point>& p) {
  vector<point> r(2 * p.size() + 14);
  long long K = 0;
  sort(p.begin(), p.end());
  for (point e : p) {
    while (K >= 2 && cross(vec(r[K - 1], r[K - 2]), vec(e, r[K - 2])) <= 0) K--;
    r[K++] = e;
  }
  for (long long i = p.size() - 2, T = K + 1; i >= 0; --i) {
    while (K >= T && cross(vec(r[K - 1], r[K - 2]), vec(p[i], r[K - 2])) <= 0)
      K--;
    r[K++] = p[i];
  }
  r.resize(K);
  r.pop_back();
  return r;
}
pair<point, bool> intersect(line& a, line& b) {
  long double x, y;
  long double tmp = b.v.x * a.v.y - a.v.x * b.v.y;
  if (!tmp) return (make_pair(point(), false));
  y = (b.c * a.v.x - b.v.x * a.c) / tmp;
  if (a.v.x) {
    x = (-a.c - a.v.y * y) / a.v.x;
  } else {
    x = (-b.c - b.v.y * y) / b.v.x;
  }
  point res(x, y);
  return (make_pair(res, true));
}
int main() {
  ios::sync_with_stdio(false);
  cout.precision(20);
  point mid;
  vec dir;
  long double a, b, c, d;
  long double x, y;
  cin >> x >> y;
  mid = point(x, y);
  cin >> x >> y;
  dir = vec(x, y);
  cin >> a >> b >> c >> d;
  long double k = sqrt((b * b) / (dir.x * dir.x + dir.y * dir.y));
  cout << dir.x * k + mid.x << " " << dir.y * k + mid.y << endl;
  k = sqrt(((a / 2) * (a / 2)) / (dir.x * dir.x + dir.y * dir.y));
  cout << -dir.y * k + mid.x << " " << dir.x * k + mid.y << endl;
  long double l = sqrt(((c / 2) * (c / 2)) / (dir.x * dir.x + dir.y * dir.y));
  long double tmpx = -dir.y * l + mid.x, tmpy = dir.x * l + mid.y;
  cout << tmpx << " " << tmpy << endl;
  long double i = sqrt(((d) * (d)) / (dir.x * dir.x + dir.y * dir.y));
  tmpx += -dir.x * i;
  tmpy += -dir.y * i;
  cout << tmpx << " " << tmpy << endl;
  tmpx += 2 * (dir.y * l);
  tmpy += 2 * (-dir.x * l);
  cout << tmpx << " " << tmpy << endl;
  tmpx += dir.x * i;
  tmpy += dir.y * i;
  cout << tmpx << " " << tmpy << endl;
  cout << dir.y * k + mid.x << " " << -dir.x * k + mid.y << endl;
  return 0;
}