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;
struct point {
  double x, y;
  point() { x = 0.0, y = 0.0; }
  point(double _x, double _y) { x = _x, y = _y; }
  bool operator<(point other) const {
    if (fabs(x - other.x) > 1e-9) return x < other.x;
    return y < other.y;
  }
};
struct line {
  double a, b, c;
  line(point p1, point p2) {
    if (fabs(p1.x - p2.x) < 1e-9) {
      a = 1.0;
      b = 0.0;
      c = -p1.x;
    } else {
      a = -(double)(p1.y - p2.y) / (p1.x - p2.x);
      b = 1.0;
      c = -(double)(a * p1.x) - p1.y;
    }
  }
};
bool areParallel(line l1, line l2) {
  return (fabs(l1.a - l2.a) < 1e-9) && (fabs(l1.b - l2.b) < 1e-9);
}
bool areSame(line l1, line l2) {
  return (areParallel(l1, l2)) && (fabs(l1.c - l2.c) < 1e-9);
}
bool areIntersect(line l1, line l2, point& p) {
  if (areParallel(l1, l2)) return false;
  p.x = (l1.c * l2.b - l1.b * l2.c) / (l2.a * l1.b - l2.b * l1.a);
  if (fabs(l1.b) > 1e-9)
    p.y = -(l1.a * p.x + l1.c);
  else
    p.y = -(l2.a * p.x + l2.c);
  return true;
}
double dist(point a, point b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + ((a.y - b.y) * (a.y - b.y)));
}
vector<string> split(const string& s, char delimiter) {
  vector<string> tokens;
  string token;
  istringstream tokenStream(s);
  while (getline(tokenStream, token, delimiter)) {
    tokens.push_back(token);
  }
  return tokens;
}
struct vec {
  double x, y;
  vec(double _x, double _y) : x(_x), y(_y) {}
};
vec toVec(point a, point b) { return vec(b.x - a.x, b.y - a.y); }
vec scale(vec v, double s) { return vec(v.x * s, v.y * s); }
point translate(point p, vec v) { return point(p.x + v.x, p.y + v.y); }
double dot(vec a, vec b) { return (a.x * b.x + a.y * b.y); }
double cross(vec a, vec b) { return a.x * b.y - a.y * b.x; }
double norm_sq(vec v) { return v.x * v.x + v.y * v.y; }
point rot(point p, double theta) {
  double rad = (theta * 3.14159265358979323846) / 180.0;
  point p2(p.x * cos(rad) - p.y * sin(rad), p.x * sin(rad) + p.y * cos(rad));
  if (abs(p2.x) < 1e-9) p2.x = 0.0;
  if (abs(p2.y) < 1e-9) p2.y = 0.0;
  return p2;
}
double angle(point a, point o, point b) {
  vec oa = toVec(o, a), ob = toVec(o, b);
  return acos(dot(oa, ob) / sqrt(norm_sq(oa) * norm_sq(ob)));
}
int main() {
  point p;
  cin >> p.x >> p.y;
  vec v(0.0, 0.0);
  cin >> v.x >> v.y;
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  point arr[7];
  double mag = sqrt(norm_sq(v));
  double ang = atan2(v.y / mag, v.x / mag);
  arr[0] = point(p.x + b * cos(ang), p.y + b * sin(ang));
  double angr = fmod((ang - 3.14159265358979323846 / 2.0),
                     2 * 3.14159265358979323846),
         angl = fmod((ang + 3.14159265358979323846 / 2.0),
                     2 * 3.14159265358979323846),
         angd =
             fmod((ang + 3.14159265358979323846), 2 * 3.14159265358979323846);
  arr[6] = point(p.x + (a / 2.0) * cos(angr), p.y + (a / 2.0) * sin(angr));
  arr[1] = point(p.x + (a / 2.0) * cos(angl), p.y + (a / 2.0) * sin(angl));
  arr[5] = point(p.x + (c / 2.0) * cos(angr), p.y + (c / 2.0) * sin(angr));
  arr[2] = point(p.x + (c / 2.0) * cos(angl), p.y + (c / 2.0) * sin(angl));
  arr[4] = point(arr[5].x + d * cos(angd), arr[5].y + d * sin(angd));
  arr[3] = point(arr[2].x + d * cos(angd), arr[2].y + d * sin(angd));
  for (int i = 0; i < 7; i++)
    cout << fixed << setprecision(12) << arr[i].x << " " << arr[i].y << endl;
}