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;
const int inf = (int)1.01e9;
const double eps = 1e-9;
namespace point_output {
static char buf[8][30];
static int bufc = 0;
}  // namespace point_output
struct pt {
  double x, y;
  pt() {}
  pt(double xx, double yy) : x(xx), y(yy) {}
  void read() {
    double xx, yy;
    scanf("%lf%lf", &xx, &yy);
    x = xx, y = yy;
  }
  void draw(int color = 0) const {
    printf("point %.4lf %.4lf %d\n", (double)x, (double)y, color);
  }
  void out() const {
    fprintf(stderr, "(%.4lf, %.4lf)\n", (double)x, (double)y), fflush(stderr);
  }
  char *str() const {
    using namespace point_output;
    bufc = (bufc + 1) & 7;
    sprintf(buf[bufc], "%.10lf %.10lf", (double)x, (double)y);
    return buf[bufc];
  }
};
inline pt operator+(pt const &p1, pt const &p2) {
  return pt(p1.x + p2.x, p1.y + p2.y);
}
inline pt operator-(pt const &p1, pt const &p2) {
  return pt(p1.x - p2.x, p1.y - p2.y);
}
inline pt operator*(pt const &p, double c) { return pt(p.x * c, p.y * c); }
inline pt operator*(double c, pt const &p) { return pt(p.x * c, p.y * c); }
inline pt operator/(pt const &p, double c) { return pt(p.x / c, p.y / c); }
inline double vect(pt const &p1, pt const &p2) {
  return p1.x * p2.y - p1.y * p2.x;
}
inline double scal(pt const &p1, pt const &p2) {
  return p1.x * p2.x + p1.y * p2.y;
}
inline double len(pt const &p) { return sqrt(p.x * p.x + p.y * p.y); }
inline double dist(pt const &p1, pt const &p2) {
  double xx = p1.x - p2.x;
  double yy = p1.y - p2.y;
  return sqrt(xx * xx + yy * yy);
}
inline bool operator<(pt const &p1, pt const &p2) {
  return p1.x < p2.x - eps || (abs(p1.x - p2.x) < eps && p1.y < p2.y - eps);
}
inline bool operator>(pt const &p1, pt const &p2) {
  return p1.x > p2.x + eps || (abs(p1.x - p2.x) < eps && p1.y > p2.y + eps);
}
inline bool operator==(pt const &p1, pt const &p2) {
  return abs(p1.x - p2.x) < eps && abs(p1.y - p2.y) < eps;
}
struct line {
  double a, b, c;
  line() {}
  line(double aa, double bb, double cc) : a(aa), b(bb), c(cc) {}
  line(pt const &p1, pt const &p2) {
    a = p1.y - p2.y;
    b = p2.x - p1.x;
    c = p1.x * p2.y - p1.y * p2.x;
  }
  inline double operator()(pt const &p) const { return a * p.x + b * p.y + c; }
  void norm() {
    double dd = sqrt(a * a + b * b);
    a /= dd;
    b /= dd;
    c /= dd;
  }
  void draw(int color = 0) const {
    printf("line %.4lf %.4lf %.4lf %d\n", (double)a, (double)b, (double)c,
           color);
  }
  void out() const {
    fprintf(stderr, "(%.4lf, %.4lf, %.4lf)\n", (double)a, (double)b, (double)c),
        fflush(stderr);
  }
};
inline pt intersect(line const &l1, line const &l2) {
  double D = l1.a * l2.b - l1.b * l2.a;
  return pt((l1.b * l2.c - l2.b * l1.c) / D,
            (l1.a * l2.c - l2.a * l1.c) / (-D));
}
inline pt proj(pt const &p, line const &l) {
  return p - pt(l.a, l.b) * (l(p) / sqrt(l.a * l.a + l.b * l.b));
}
inline double dist(pt const &p, line const &l) {
  return abs(l(p) / sqrt(l.a * l.a + l.b * l.b));
}
inline double dist(line const &l, pt const &p) {
  return abs(l(p) / sqrt(l.a * l.a + l.b * l.b));
}
const double PI = acos(-1);
int n, r;
pt get(int i) {
  double alp = 2 * PI * i / n;
  return pt(cos(alp) * r, sin(alp) * r);
}
void out(pt p) { printf("%.10f %.10f\n", p.x, p.y); }
int main() {
  pt P, V;
  P.read();
  V.read();
  double a, b, c, d;
  cin >> a >> b >> c >> d;
  V = V * (1. / len(V));
  pt V2 = pt(-V.y, V.x);
  out(P + V * b);
  out(P + V2 * (a / 2));
  out(P + V2 * (c / 2));
  out(P + V2 * (c / 2) - V * d);
  out(P - V2 * (c / 2) - V * d);
  out(P - V2 * (c / 2));
  out(P - V2 * (a / 2));
  return 0;
}