#include <bits/stdc++.h>
using namespace std;
const long double pi = acosl(-1);
const long double radian = 180 / pi;
const long double eps = 1e-12;
const int inf = 0x7f7f7f7f;
const long long infll = 0x7f7f7f7f7f7f7f7fll;
const long double infl = 1e20;
inline int sgn(const long double &x) { return (x > eps) - (x < -eps); }
inline int sgn(const long long &x) { return (x > 0) - (x < 0); }
inline long double sqr(const long double &x) { return x * x; }
inline long long sqr(const long long &x) { return x * x; }
inline long double refresh(const long double &x) {
  if (x < -1 + eps)
    return -1;
  else if (x > 1 - eps)
    return 1;
  else
    return x;
}
struct point {
  long double x, y;
  point() : x(0), y(0) {}
  point(const long double &x, const long double &y) : x(x), y(y) {}
  void input() {
    long long _x, _y;
    scanf("%lld%lld", &_x, &_y);
    x = _x, y = _y;
  }
  void display() { printf("%.10Lf %.10Lf\n", x, y); }
  long double angle() const { return atan2l(y, x); }
  long double angle(const point &lhs, const point &rhs) const {
    return (lhs - *this) ^ (rhs - *this);
  }
  long double length() const { return sqrtl(sqr(x) + sqr(y)); }
  long double length2() const { return sqr(x) + sqr(y); }
  long double distance(const point &rhs) const {
    return (rhs - *this).length();
  }
  long double distance2(const point &rhs) const {
    return (rhs - *this).length2();
  }
  point rotate(const long double &a) const {
    long double c = cosl(a), s = sinl(a);
    return point(x * c - y * s, x * s + y * c);
  }
  point polar(const long double &r, const long double &t) const {
    return point(x + r * cosl(t), y + r * sinl(t));
  }
  point conjugate() const { return point(x, -y); }
  point unit(const long double &n = 1) const {
    long double l = length();
    return sgn(l) == 0 ? point(n, 0) : point(x / l * n, y / l * n);
  }
  point normal(const bool &lft = true) const {
    return lft ? point(-y, x) : point(y, -x);
  }
  point moderate() const { return *this * (this->quadrant() <= 4 ? -1 : 1); }
  long double vect(const point &lhs, const point &rhs) const {
    return (lhs - *this) * (rhs - *this);
  }
  long double scal(const point &lhs, const point &rhs) const {
    return (lhs - *this) & (rhs - *this);
  }
  point project(const point &p, const point &q) const {
    return p + (q - p) * p.scal(q, *this) / p.distance2(q);
  }
  point mirror(const point &p, const point &q) const {
    return this->project(p, q) * 2 - *this;
  }
  long double distance_to_line(const point &p, const point &q) const {
    return fabsl(p.vect(q, *this) / p.distance(q));
  }
  long double distance_to_segment(const point &p, const point &q) const {
    if (p.scal(q, *this) < 0)
      return p.distance(*this);
    else if (q.scal(p, *this) < 0)
      return q.distance(*this);
    else
      return this->distance_to_line(p, q);
  }
  bool on_line(const point &p, const point &q) const {
    return sgn(this->vect(p, q)) == 0;
  }
  bool on_halfline(const point &p, const point &q,
                   const bool &inclusive = true) const {
    if (*this == p)
      return inclusive;
    else
      return this->on_line(p, q) && sgn(p.scal(q, *this)) >= 0;
  }
  bool on_segment(const point &p, const point &q,
                  const bool &inclusive = true) const {
    if (*this == p || *this == q)
      return inclusive;
    else
      return this->on_line(p, q) && sgn(this->scal(p, q)) <= 0;
  }
  bool in_triangle(const point &u, const point &v, const point &w,
                   const bool &inclusive = true) const {
    point p[3] = {u, v, w};
    if (sgn(u.vect(v, w)) < 0) reverse(p, p + 3);
    for (int i = 0; i < 3; i++) {
      if (this->on_segment(p[i], p[(i + 1) % 3]))
        return inclusive;
      else if (sgn(this->vect(p[i], p[(i + 1) % 3])) < 0)
        return false;
    }
    return true;
  }
  bool in_angle(const point &o, const point &p, const point &q,
                const bool &inclusive = true) const {
    if (this->on_halfline(o, p) || this->on_halfline(o, q)) return inclusive;
    int vp = sgn(o.vect(p, *this)), vq = sgn(o.vect(*this, q));
    if (sgn(o.vect(p, q)) >= 0)
      return vp > 0 && vq > 0;
    else
      return vp > 0 || vq > 0;
  }
  point operator+(const point &rhs) const {
    return point(x + rhs.x, y + rhs.y);
  }
  point operator-(const point &rhs) const {
    return point(x - rhs.x, y - rhs.y);
  }
  point operator*(const long double &rhs) const {
    return point(x * rhs, y * rhs);
  }
  point operator/(const long double &rhs) const {
    return point(x / rhs, y / rhs);
  }
  long double operator*(const point &rhs) const {
    return x * rhs.y - y * rhs.x;
  }
  long double operator&(const point &rhs) const {
    return x * rhs.x + y * rhs.y;
  }
  point operator<<(const point &rhs) const {
    return point(x * rhs.x - y * rhs.y, x * rhs.y + y * rhs.x);
  }
  point operator>>(const point &rhs) const {
    return point(x * rhs.x + y * rhs.y, -x * rhs.y + y * rhs.x) / rhs.length2();
  }
  long double operator^(const point &rhs) const {
    int s = sgn(*this * rhs);
    long double a = acosl(
        refresh((long double)(*this & rhs) / this->length() / rhs.length()));
    return s < 0 ? -a : a;
  }
  bool operator==(const point &rhs) const {
    return sgn(x - rhs.x) == 0 && sgn(y - rhs.y) == 0;
  }
  int quadrant() const {
    int xs = sgn(x), ys = sgn(y);
    if (xs == 0 && ys == 0)
      return 0;
    else if (xs < 0 && ys < 0)
      return 1;
    else if (xs == 0 && ys < 0)
      return 2;
    else if (xs > 0 && ys < 0)
      return 3;
    else if (xs > 0 && ys == 0)
      return 4;
    else if (xs > 0 && ys > 0)
      return 5;
    else if (xs == 0 && ys > 0)
      return 6;
    else if (xs < 0 && ys > 0)
      return 7;
    else
      return 8;
  }
  bool operator<(const point &rhs) const {
    int lq = quadrant(), rq = rhs.quadrant();
    if (lq != rq)
      return lq < rq;
    else {
      int s = sgn(*this * rhs);
      return s != 0 ? s > 0 : sgn(length2() - rhs.length2()) < 0;
    }
  }
  bool on_left(const point &rhs, const bool &inclusive = true) const {
    int s = sgn(*this * rhs), t = sgn(*this & rhs);
    return s == 0 ? t >= 0 || inclusive : s > 0;
  }
  bool on_right(const point &rhs, const bool &inclusive = true) const {
    int s = sgn(*this * rhs), t = sgn(*this & rhs);
    return s == 0 ? t >= 0 || inclusive : s < 0;
  }
};
inline bool xycmp(const point &lhs, const point &rhs) {
  if (sgn(lhs.x - rhs.x) != 0)
    return lhs.x < rhs.x;
  else
    return lhs.y < rhs.y;
}
inline bool yxcmp(const point &lhs, const point &rhs) {
  if (sgn(lhs.y - rhs.y) != 0)
    return lhs.y < rhs.y;
  else
    return lhs.x < rhs.x;
}
bool segment_segment_intersect(const point &p1, const point &p2,
                               const point &q1, const point &q2, point &ans,
                               const bool &inclusive = true) {
  long double pv1 = p1.vect(p2, q1), pv2 = p1.vect(p2, q2);
  int pv1s = sgn(pv1), pv2s = sgn(pv2);
  long double qv1 = q1.vect(q2, p1), qv2 = q1.vect(q2, p2);
  int qv1s = sgn(qv1), qv2s = sgn(qv2);
  if (pv1s == 0 && pv2s == 0) {
    point v = p2 - p1;
    point pa[2] = {p1, p2}, qa[2] = {q1, q2};
    if ((v & q1) - (v & q2) > 0) swap(qa[0], qa[1]);
    point mn = (v & pa[0]) - (v & qa[0]) > 0 ? pa[0] : qa[0],
          mx = (v & pa[1]) - (v & qa[1]) < 0 ? pa[1] : qa[1];
    ans = (mn + mx) / 2;
    int s = sgn((v & mn) - (v & mx));
    return s == 0 ? inclusive : s < 0;
  } else {
    ans = q1 * (pv2 / (pv1 + pv2)) + q2 * (pv1 / (pv1 + pv2));
    if (pv1s * pv2s > 0 || qv1s * qv2s > 0)
      return false;
    else if (pv1s * pv2s == 0 || qv1s * qv2s == 0)
      return inclusive;
    else
      return true;
  }
}
point p, v;
long double a, b, c, d;
int main() {
  p.input();
  v.input();
  scanf("%Lf%Lf%Lf%Lf", &a, &b, &c, &d);
  point top = p + v.unit(b);
  point left = p + v.rotate(pi / 2).unit((long double)a / 2);
  point right = p - v.rotate(pi / 2).unit((long double)a / 2);
  point A = p + v.rotate(pi / 2).unit((long double)c / 2);
  point B = p - v.rotate(pi / 2).unit((long double)c / 2);
  point C = A + (v * -1).unit(d);
  point D = B + (v * -1).unit(d);
  top.display();
  left.display();
  A.display();
  C.display();
  D.display();
  B.display();
  right.display();
  return 0;
}

### Prompt

Generate a CPP solution to the following 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

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long double pi = acosl(-1);
const long double radian = 180 / pi;
const long double eps = 1e-12;
const int inf = 0x7f7f7f7f;
const long long infll = 0x7f7f7f7f7f7f7f7fll;
const long double infl = 1e20;
inline int sgn(const long double &x) { return (x > eps) - (x < -eps); }
inline int sgn(const long long &x) { return (x > 0) - (x < 0); }
inline long double sqr(const long double &x) { return x * x; }
inline long long sqr(const long long &x) { return x * x; }
inline long double refresh(const long double &x) {
  if (x < -1 + eps)
    return -1;
  else if (x > 1 - eps)
    return 1;
  else
    return x;
}
struct point {
  long double x, y;
  point() : x(0), y(0) {}
  point(const long double &x, const long double &y) : x(x), y(y) {}
  void input() {
    long long _x, _y;
    scanf("%lld%lld", &_x, &_y);
    x = _x, y = _y;
  }
  void display() { printf("%.10Lf %.10Lf\n", x, y); }
  long double angle() const { return atan2l(y, x); }
  long double angle(const point &lhs, const point &rhs) const {
    return (lhs - *this) ^ (rhs - *this);
  }
  long double length() const { return sqrtl(sqr(x) + sqr(y)); }
  long double length2() const { return sqr(x) + sqr(y); }
  long double distance(const point &rhs) const {
    return (rhs - *this).length();
  }
  long double distance2(const point &rhs) const {
    return (rhs - *this).length2();
  }
  point rotate(const long double &a) const {
    long double c = cosl(a), s = sinl(a);
    return point(x * c - y * s, x * s + y * c);
  }
  point polar(const long double &r, const long double &t) const {
    return point(x + r * cosl(t), y + r * sinl(t));
  }
  point conjugate() const { return point(x, -y); }
  point unit(const long double &n = 1) const {
    long double l = length();
    return sgn(l) == 0 ? point(n, 0) : point(x / l * n, y / l * n);
  }
  point normal(const bool &lft = true) const {
    return lft ? point(-y, x) : point(y, -x);
  }
  point moderate() const { return *this * (this->quadrant() <= 4 ? -1 : 1); }
  long double vect(const point &lhs, const point &rhs) const {
    return (lhs - *this) * (rhs - *this);
  }
  long double scal(const point &lhs, const point &rhs) const {
    return (lhs - *this) & (rhs - *this);
  }
  point project(const point &p, const point &q) const {
    return p + (q - p) * p.scal(q, *this) / p.distance2(q);
  }
  point mirror(const point &p, const point &q) const {
    return this->project(p, q) * 2 - *this;
  }
  long double distance_to_line(const point &p, const point &q) const {
    return fabsl(p.vect(q, *this) / p.distance(q));
  }
  long double distance_to_segment(const point &p, const point &q) const {
    if (p.scal(q, *this) < 0)
      return p.distance(*this);
    else if (q.scal(p, *this) < 0)
      return q.distance(*this);
    else
      return this->distance_to_line(p, q);
  }
  bool on_line(const point &p, const point &q) const {
    return sgn(this->vect(p, q)) == 0;
  }
  bool on_halfline(const point &p, const point &q,
                   const bool &inclusive = true) const {
    if (*this == p)
      return inclusive;
    else
      return this->on_line(p, q) && sgn(p.scal(q, *this)) >= 0;
  }
  bool on_segment(const point &p, const point &q,
                  const bool &inclusive = true) const {
    if (*this == p || *this == q)
      return inclusive;
    else
      return this->on_line(p, q) && sgn(this->scal(p, q)) <= 0;
  }
  bool in_triangle(const point &u, const point &v, const point &w,
                   const bool &inclusive = true) const {
    point p[3] = {u, v, w};
    if (sgn(u.vect(v, w)) < 0) reverse(p, p + 3);
    for (int i = 0; i < 3; i++) {
      if (this->on_segment(p[i], p[(i + 1) % 3]))
        return inclusive;
      else if (sgn(this->vect(p[i], p[(i + 1) % 3])) < 0)
        return false;
    }
    return true;
  }
  bool in_angle(const point &o, const point &p, const point &q,
                const bool &inclusive = true) const {
    if (this->on_halfline(o, p) || this->on_halfline(o, q)) return inclusive;
    int vp = sgn(o.vect(p, *this)), vq = sgn(o.vect(*this, q));
    if (sgn(o.vect(p, q)) >= 0)
      return vp > 0 && vq > 0;
    else
      return vp > 0 || vq > 0;
  }
  point operator+(const point &rhs) const {
    return point(x + rhs.x, y + rhs.y);
  }
  point operator-(const point &rhs) const {
    return point(x - rhs.x, y - rhs.y);
  }
  point operator*(const long double &rhs) const {
    return point(x * rhs, y * rhs);
  }
  point operator/(const long double &rhs) const {
    return point(x / rhs, y / rhs);
  }
  long double operator*(const point &rhs) const {
    return x * rhs.y - y * rhs.x;
  }
  long double operator&(const point &rhs) const {
    return x * rhs.x + y * rhs.y;
  }
  point operator<<(const point &rhs) const {
    return point(x * rhs.x - y * rhs.y, x * rhs.y + y * rhs.x);
  }
  point operator>>(const point &rhs) const {
    return point(x * rhs.x + y * rhs.y, -x * rhs.y + y * rhs.x) / rhs.length2();
  }
  long double operator^(const point &rhs) const {
    int s = sgn(*this * rhs);
    long double a = acosl(
        refresh((long double)(*this & rhs) / this->length() / rhs.length()));
    return s < 0 ? -a : a;
  }
  bool operator==(const point &rhs) const {
    return sgn(x - rhs.x) == 0 && sgn(y - rhs.y) == 0;
  }
  int quadrant() const {
    int xs = sgn(x), ys = sgn(y);
    if (xs == 0 && ys == 0)
      return 0;
    else if (xs < 0 && ys < 0)
      return 1;
    else if (xs == 0 && ys < 0)
      return 2;
    else if (xs > 0 && ys < 0)
      return 3;
    else if (xs > 0 && ys == 0)
      return 4;
    else if (xs > 0 && ys > 0)
      return 5;
    else if (xs == 0 && ys > 0)
      return 6;
    else if (xs < 0 && ys > 0)
      return 7;
    else
      return 8;
  }
  bool operator<(const point &rhs) const {
    int lq = quadrant(), rq = rhs.quadrant();
    if (lq != rq)
      return lq < rq;
    else {
      int s = sgn(*this * rhs);
      return s != 0 ? s > 0 : sgn(length2() - rhs.length2()) < 0;
    }
  }
  bool on_left(const point &rhs, const bool &inclusive = true) const {
    int s = sgn(*this * rhs), t = sgn(*this & rhs);
    return s == 0 ? t >= 0 || inclusive : s > 0;
  }
  bool on_right(const point &rhs, const bool &inclusive = true) const {
    int s = sgn(*this * rhs), t = sgn(*this & rhs);
    return s == 0 ? t >= 0 || inclusive : s < 0;
  }
};
inline bool xycmp(const point &lhs, const point &rhs) {
  if (sgn(lhs.x - rhs.x) != 0)
    return lhs.x < rhs.x;
  else
    return lhs.y < rhs.y;
}
inline bool yxcmp(const point &lhs, const point &rhs) {
  if (sgn(lhs.y - rhs.y) != 0)
    return lhs.y < rhs.y;
  else
    return lhs.x < rhs.x;
}
bool segment_segment_intersect(const point &p1, const point &p2,
                               const point &q1, const point &q2, point &ans,
                               const bool &inclusive = true) {
  long double pv1 = p1.vect(p2, q1), pv2 = p1.vect(p2, q2);
  int pv1s = sgn(pv1), pv2s = sgn(pv2);
  long double qv1 = q1.vect(q2, p1), qv2 = q1.vect(q2, p2);
  int qv1s = sgn(qv1), qv2s = sgn(qv2);
  if (pv1s == 0 && pv2s == 0) {
    point v = p2 - p1;
    point pa[2] = {p1, p2}, qa[2] = {q1, q2};
    if ((v & q1) - (v & q2) > 0) swap(qa[0], qa[1]);
    point mn = (v & pa[0]) - (v & qa[0]) > 0 ? pa[0] : qa[0],
          mx = (v & pa[1]) - (v & qa[1]) < 0 ? pa[1] : qa[1];
    ans = (mn + mx) / 2;
    int s = sgn((v & mn) - (v & mx));
    return s == 0 ? inclusive : s < 0;
  } else {
    ans = q1 * (pv2 / (pv1 + pv2)) + q2 * (pv1 / (pv1 + pv2));
    if (pv1s * pv2s > 0 || qv1s * qv2s > 0)
      return false;
    else if (pv1s * pv2s == 0 || qv1s * qv2s == 0)
      return inclusive;
    else
      return true;
  }
}
point p, v;
long double a, b, c, d;
int main() {
  p.input();
  v.input();
  scanf("%Lf%Lf%Lf%Lf", &a, &b, &c, &d);
  point top = p + v.unit(b);
  point left = p + v.rotate(pi / 2).unit((long double)a / 2);
  point right = p - v.rotate(pi / 2).unit((long double)a / 2);
  point A = p + v.rotate(pi / 2).unit((long double)c / 2);
  point B = p - v.rotate(pi / 2).unit((long double)c / 2);
  point C = A + (v * -1).unit(d);
  point D = B + (v * -1).unit(d);
  top.display();
  left.display();
  A.display();
  C.display();
  D.display();
  B.display();
  right.display();
  return 0;
}

```