#include <bits/stdc++.h>
using namespace std;
bool equal(double a, double b) { return (fabs(a - b) < 1e-9); }
struct point_i {
  int x, y;
  point_i() { x = y = 0; }
  point_i(int _x, int _y) : x(_x), y(_y) {}
};
struct point {
  double x, y;
  point() { x = y = 0.0; }
  point(double _x, double _y) : x(_x), y(_y) {}
  bool operator<(point other) const {
    if (equal(x, other.x)) {
      return y < other.y;
    }
    return x < other.x;
  }
  bool operator==(point other) const {
    return (equal(x, other.x) && equal(y, other.y));
  }
};
double dist(point a, point b) { return hypot(a.x - b.x, a.y - b.y); }
point rotate(point p, double theta) {
  double rad = (theta * (3.14159265358979323846 / 180.0));
  double c = cos(rad);
  double s = sin(rad);
  return point(p.x * c - p.y * s, p.x * s + p.y * c);
}
struct line {
  double a, b, c;
  line(double _a, double _b, double _c) {
    if (equal(_b, 0.0)) {
      a = 1.0;
      b = 0.0;
      c = _c / _a;
    } else {
      b = 1.0;
      a = _a / _b;
      c = _c / _b;
    }
  }
  double angle() {
    double z = atan2(-a, b);
    if (z < 0) z += 3.14159265358979323846;
    return z;
  }
  line() {}
};
void pointsToLine(point p1, point p2, line &l) {
  if (equal(p1.x, p2.x)) {
    l.a = 1.0;
    l.b = 0.0;
    l.c = -p1.x;
  } else {
    l.b = 1.0;
    l.a = -(double)(p1.y - p2.y) / (p1.x - p2.x);
    l.c = -(double)(l.a * p1.x) - p1.y;
  }
}
bool areParallel(line l1, line l2) {
  return (equal(l1.a, l2.a) && equal(l1.b, l2.b));
}
bool areSame(line l1, line l2) {
  return (areParallel(l1, l2) && equal(l1.b, l2.b));
}
bool areIntersect(line l1, line l2, point &p) {
  if (areParallel(l1, l2)) return false;
  p.x = (l2.b * l1.c - l1.b * l2.c) / (l2.a * l1.b - l1.a * l2.b);
  if (!equal(l1.b, 0.0))
    p.y = -(l1.a * p.x + l1.c);
  else
    p.y = -(l2.a * p.x + l2.c);
  return true;
}
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 norm_sq(vec v) { return v.x * v.x + v.y * v.y; }
double magnitude(vec v) { return sqrt(norm_sq(v)); }
double distToLine(point p, point a, point b, point &c) {
  vec ap = toVec(a, p), ab = toVec(a, b);
  double u = dot(ap, ab) / norm_sq(ab);
  c = translate(a, scale(ab, u));
  return dist(p, c);
}
double distToLineSegment(point p, point a, point b, point &c) {
  vec ap = toVec(a, p), ab = toVec(a, b);
  double u = dot(ap, ab) / norm_sq(ab);
  if (u < 0.0) {
    c = point(a.x, a.y);
    return dist(p, a);
  }
  if (u > 1.0) {
    c = point(b.x, b.y);
    return dist(p, b);
  }
  c = translate(a, scale(ab, u));
  return dist(p, c);
}
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))));
}
double cross(vec a, vec b) { return a.x * b.y - a.y * b.x; }
bool ccw(point p, point q, point r) {
  return cross(toVec(p, q), toVec(p, r)) > 0;
}
bool collinear(point p, point q, point r) {
  return equal(cross(toVec(p, q), toVec(p, r)), 0.0);
}
bool lineIntersectLineSegment(line l, point a, point b, point &c) {
  line l1;
  pointsToLine(a, b, l1);
  bool res = areIntersect(l, l1, c);
  if (!res) return res;
  if (equal(dist(a, b), dist(a, c) + dist(b, c))) return true;
  return false;
}
struct circle {
  double r, x, y;
};
int pointCircle(point p, circle c) {
  double dx = p.x - c.x, dy = p.y - c.y;
  double e = dx * dx + dy * dy - c.r * c.r;
  if (equal(e, 0.0))
    return 0;
  else if (e < 0.0)
    return -1;
  else
    return 1;
}
double perimeter(const vector<point> &P) {
  double result = 0.0;
  for (int i = 0; i < (int)P.size() - 1; i++) result += dist(P[i], P[i + 1]);
  return result;
}
double area(const vector<point> &P) {
  double result = 0.0, x1, y1, x2, y2;
  for (int i = 0; i < (int)P.size() - 1; i++) {
    x1 = P[i].x;
    x2 = P[i + 1].x;
    y1 = P[i].y;
    y2 = P[i + 1].y;
    result += (x1 * y2 - x2 * y1);
  }
  return fabs(result) / 2.0;
}
bool isConvex(const vector<point> &P) {
  int sz = (int)P.size();
  if (sz <= 3) return false;
  bool isLeft = ccw(P[0], P[1], P[2]);
  for (int i = 1; i < sz - 1; i++)
    if (ccw(P[i], P[i + 1], P[(i + 2) == sz ? 1 : i + 2]) != isLeft)
      return false;
  return true;
}
bool inPolygon(point pt, const vector<point> &P) {
  if ((int)P.size() == 0) return false;
  double sum = 0;
  for (int i = 0; i < (int)P.size() - 1; i++) {
    if (ccw(pt, P[i], P[i + 1]))
      sum += angle(P[i], pt, P[i + 1]);
    else
      sum -= angle(P[i], pt, P[i + 1]);
  }
  return fabs(fabs(sum) - 2 * 3.14159265358979323846) < 1e-9;
}
point lineIntersectSeg(point p, point q, point A, point B) {
  double a = B.y - A.y;
  double b = A.x - B.x;
  double c = B.x * A.y - A.x * B.y;
  double u = fabs(a * p.x + b * p.y + c);
  double v = fabs(a * q.x + b * q.y + c);
  return point((p.x * v + q.x * u) / (u + v), (p.y * v + q.y * u) / (u + v));
}
vector<point> cutPolygon(point a, point b, const vector<point> &Q) {
  vector<point> P;
  for (int i = 0; i < (int)Q.size(); i++) {
    double left1 = cross(toVec(a, b), toVec(a, Q[i])), left2 = 0;
    if (i != (int)Q.size() - 1) left2 = cross(toVec(a, b), toVec(a, Q[i + 1]));
    if (left1 > -1e-9) P.push_back(Q[i]);
    if (left1 * left2 < -1e-9)
      P.push_back(lineIntersectSeg(Q[i], Q[i + 1], a, b));
  }
  if (!P.empty() && !(P.back() == P.front())) P.push_back(P.front());
  return P;
}
point pivot(0, 0);
bool angleCmp(point a, point b) {
  if (collinear(pivot, a, b)) return dist(pivot, a) < dist(pivot, b);
  double d1x = a.x - pivot.x, d1y = a.y - pivot.y;
  double d2x = b.x - pivot.x, d2y = b.y - pivot.y;
  return (atan2(d1y, d1x) - atan2(d2y, d2x)) < 0;
}
vector<point> CH(vector<point> P) {
  int i, j, n = (int)P.size();
  if (n <= 3) {
    if (!(P[0] == P[n - 1])) P.push_back(P[0]);
    return P;
  }
  int P0 = 0;
  for (i = 1; i < n; i++)
    if (P[i].y < P[P0].y || (P[i].y == P[P0].y && P[i].x > P[P0].x)) P0 = i;
  point temp = P[0];
  P[0] = P[P0];
  P[P0] = temp;
  pivot = P[0];
  sort(++P.begin(), P.end(), angleCmp);
  vector<point> S;
  S.push_back(P[n - 1]);
  S.push_back(P[0]);
  S.push_back(P[1]);
  i = 2;
  while (i < n) {
    j = (int)S.size() - 1;
    if (j == 0) {
      S.clear();
      S.push_back(P[n - 1]);
      S.push_back(P[0]);
      S.push_back(P[n - 1]);
      return S;
    }
    if (ccw(S[j - 1], S[j], P[i]))
      S.push_back(P[i++]);
    else
      S.pop_back();
  }
  return S;
}
void solve() {
  point vv;
  int px, py, vx, vy;
  int a, b, c, d;
  cin >> px >> py >> vx >> vy >> a >> b >> c >> d;
  double len = sqrt(vx * vx + vy * vy);
  vv.x = (double)vx / len;
  vv.y = (double)vy / len;
  point p(px, py);
  point ans[7];
  ans[0] = p;
  ans[0] = translate(ans[0], vec(vv.x * b, vv.y * b));
  vv = rotate(vv, 90);
  ans[1] = p;
  ans[1] = translate(ans[1], vec((vv.x * a) / 2.0, (vv.y * a) / 2.0));
  ans[2] = p;
  ans[2] = translate(ans[2], vec((vv.x * c) / 2.0, (vv.y * c) / 2.0));
  vv = rotate(vv, 180);
  ans[5] = p;
  ans[5] = translate(ans[5], vec((vv.x * c) / 2.0, (vv.y * c) / 2.0));
  ans[6] = p;
  ans[6] = translate(ans[6], vec((vv.x * a) / 2.0, (vv.y * a) / 2.0));
  vv = rotate(vv, 270);
  ans[3] = ans[2];
  ans[3] = translate(ans[3], vec((vv.x * d), (vv.y * d)));
  ans[4] = ans[5];
  ans[4] = translate(ans[4], vec((vv.x * d), (vv.y * d)));
  for (int i = 0; i < (int)(7); i++) {
    printf("%.10f %.10f\n", ans[i].x, ans[i].y);
  }
}
int main() {
  int TC = 1;
  for (int ZZ = 1; ZZ <= TC; ZZ++) {
    solve();
  }
  return 0;
}

### Prompt

Your task is to create 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;
bool equal(double a, double b) { return (fabs(a - b) < 1e-9); }
struct point_i {
  int x, y;
  point_i() { x = y = 0; }
  point_i(int _x, int _y) : x(_x), y(_y) {}
};
struct point {
  double x, y;
  point() { x = y = 0.0; }
  point(double _x, double _y) : x(_x), y(_y) {}
  bool operator<(point other) const {
    if (equal(x, other.x)) {
      return y < other.y;
    }
    return x < other.x;
  }
  bool operator==(point other) const {
    return (equal(x, other.x) && equal(y, other.y));
  }
};
double dist(point a, point b) { return hypot(a.x - b.x, a.y - b.y); }
point rotate(point p, double theta) {
  double rad = (theta * (3.14159265358979323846 / 180.0));
  double c = cos(rad);
  double s = sin(rad);
  return point(p.x * c - p.y * s, p.x * s + p.y * c);
}
struct line {
  double a, b, c;
  line(double _a, double _b, double _c) {
    if (equal(_b, 0.0)) {
      a = 1.0;
      b = 0.0;
      c = _c / _a;
    } else {
      b = 1.0;
      a = _a / _b;
      c = _c / _b;
    }
  }
  double angle() {
    double z = atan2(-a, b);
    if (z < 0) z += 3.14159265358979323846;
    return z;
  }
  line() {}
};
void pointsToLine(point p1, point p2, line &l) {
  if (equal(p1.x, p2.x)) {
    l.a = 1.0;
    l.b = 0.0;
    l.c = -p1.x;
  } else {
    l.b = 1.0;
    l.a = -(double)(p1.y - p2.y) / (p1.x - p2.x);
    l.c = -(double)(l.a * p1.x) - p1.y;
  }
}
bool areParallel(line l1, line l2) {
  return (equal(l1.a, l2.a) && equal(l1.b, l2.b));
}
bool areSame(line l1, line l2) {
  return (areParallel(l1, l2) && equal(l1.b, l2.b));
}
bool areIntersect(line l1, line l2, point &p) {
  if (areParallel(l1, l2)) return false;
  p.x = (l2.b * l1.c - l1.b * l2.c) / (l2.a * l1.b - l1.a * l2.b);
  if (!equal(l1.b, 0.0))
    p.y = -(l1.a * p.x + l1.c);
  else
    p.y = -(l2.a * p.x + l2.c);
  return true;
}
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 norm_sq(vec v) { return v.x * v.x + v.y * v.y; }
double magnitude(vec v) { return sqrt(norm_sq(v)); }
double distToLine(point p, point a, point b, point &c) {
  vec ap = toVec(a, p), ab = toVec(a, b);
  double u = dot(ap, ab) / norm_sq(ab);
  c = translate(a, scale(ab, u));
  return dist(p, c);
}
double distToLineSegment(point p, point a, point b, point &c) {
  vec ap = toVec(a, p), ab = toVec(a, b);
  double u = dot(ap, ab) / norm_sq(ab);
  if (u < 0.0) {
    c = point(a.x, a.y);
    return dist(p, a);
  }
  if (u > 1.0) {
    c = point(b.x, b.y);
    return dist(p, b);
  }
  c = translate(a, scale(ab, u));
  return dist(p, c);
}
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))));
}
double cross(vec a, vec b) { return a.x * b.y - a.y * b.x; }
bool ccw(point p, point q, point r) {
  return cross(toVec(p, q), toVec(p, r)) > 0;
}
bool collinear(point p, point q, point r) {
  return equal(cross(toVec(p, q), toVec(p, r)), 0.0);
}
bool lineIntersectLineSegment(line l, point a, point b, point &c) {
  line l1;
  pointsToLine(a, b, l1);
  bool res = areIntersect(l, l1, c);
  if (!res) return res;
  if (equal(dist(a, b), dist(a, c) + dist(b, c))) return true;
  return false;
}
struct circle {
  double r, x, y;
};
int pointCircle(point p, circle c) {
  double dx = p.x - c.x, dy = p.y - c.y;
  double e = dx * dx + dy * dy - c.r * c.r;
  if (equal(e, 0.0))
    return 0;
  else if (e < 0.0)
    return -1;
  else
    return 1;
}
double perimeter(const vector<point> &P) {
  double result = 0.0;
  for (int i = 0; i < (int)P.size() - 1; i++) result += dist(P[i], P[i + 1]);
  return result;
}
double area(const vector<point> &P) {
  double result = 0.0, x1, y1, x2, y2;
  for (int i = 0; i < (int)P.size() - 1; i++) {
    x1 = P[i].x;
    x2 = P[i + 1].x;
    y1 = P[i].y;
    y2 = P[i + 1].y;
    result += (x1 * y2 - x2 * y1);
  }
  return fabs(result) / 2.0;
}
bool isConvex(const vector<point> &P) {
  int sz = (int)P.size();
  if (sz <= 3) return false;
  bool isLeft = ccw(P[0], P[1], P[2]);
  for (int i = 1; i < sz - 1; i++)
    if (ccw(P[i], P[i + 1], P[(i + 2) == sz ? 1 : i + 2]) != isLeft)
      return false;
  return true;
}
bool inPolygon(point pt, const vector<point> &P) {
  if ((int)P.size() == 0) return false;
  double sum = 0;
  for (int i = 0; i < (int)P.size() - 1; i++) {
    if (ccw(pt, P[i], P[i + 1]))
      sum += angle(P[i], pt, P[i + 1]);
    else
      sum -= angle(P[i], pt, P[i + 1]);
  }
  return fabs(fabs(sum) - 2 * 3.14159265358979323846) < 1e-9;
}
point lineIntersectSeg(point p, point q, point A, point B) {
  double a = B.y - A.y;
  double b = A.x - B.x;
  double c = B.x * A.y - A.x * B.y;
  double u = fabs(a * p.x + b * p.y + c);
  double v = fabs(a * q.x + b * q.y + c);
  return point((p.x * v + q.x * u) / (u + v), (p.y * v + q.y * u) / (u + v));
}
vector<point> cutPolygon(point a, point b, const vector<point> &Q) {
  vector<point> P;
  for (int i = 0; i < (int)Q.size(); i++) {
    double left1 = cross(toVec(a, b), toVec(a, Q[i])), left2 = 0;
    if (i != (int)Q.size() - 1) left2 = cross(toVec(a, b), toVec(a, Q[i + 1]));
    if (left1 > -1e-9) P.push_back(Q[i]);
    if (left1 * left2 < -1e-9)
      P.push_back(lineIntersectSeg(Q[i], Q[i + 1], a, b));
  }
  if (!P.empty() && !(P.back() == P.front())) P.push_back(P.front());
  return P;
}
point pivot(0, 0);
bool angleCmp(point a, point b) {
  if (collinear(pivot, a, b)) return dist(pivot, a) < dist(pivot, b);
  double d1x = a.x - pivot.x, d1y = a.y - pivot.y;
  double d2x = b.x - pivot.x, d2y = b.y - pivot.y;
  return (atan2(d1y, d1x) - atan2(d2y, d2x)) < 0;
}
vector<point> CH(vector<point> P) {
  int i, j, n = (int)P.size();
  if (n <= 3) {
    if (!(P[0] == P[n - 1])) P.push_back(P[0]);
    return P;
  }
  int P0 = 0;
  for (i = 1; i < n; i++)
    if (P[i].y < P[P0].y || (P[i].y == P[P0].y && P[i].x > P[P0].x)) P0 = i;
  point temp = P[0];
  P[0] = P[P0];
  P[P0] = temp;
  pivot = P[0];
  sort(++P.begin(), P.end(), angleCmp);
  vector<point> S;
  S.push_back(P[n - 1]);
  S.push_back(P[0]);
  S.push_back(P[1]);
  i = 2;
  while (i < n) {
    j = (int)S.size() - 1;
    if (j == 0) {
      S.clear();
      S.push_back(P[n - 1]);
      S.push_back(P[0]);
      S.push_back(P[n - 1]);
      return S;
    }
    if (ccw(S[j - 1], S[j], P[i]))
      S.push_back(P[i++]);
    else
      S.pop_back();
  }
  return S;
}
void solve() {
  point vv;
  int px, py, vx, vy;
  int a, b, c, d;
  cin >> px >> py >> vx >> vy >> a >> b >> c >> d;
  double len = sqrt(vx * vx + vy * vy);
  vv.x = (double)vx / len;
  vv.y = (double)vy / len;
  point p(px, py);
  point ans[7];
  ans[0] = p;
  ans[0] = translate(ans[0], vec(vv.x * b, vv.y * b));
  vv = rotate(vv, 90);
  ans[1] = p;
  ans[1] = translate(ans[1], vec((vv.x * a) / 2.0, (vv.y * a) / 2.0));
  ans[2] = p;
  ans[2] = translate(ans[2], vec((vv.x * c) / 2.0, (vv.y * c) / 2.0));
  vv = rotate(vv, 180);
  ans[5] = p;
  ans[5] = translate(ans[5], vec((vv.x * c) / 2.0, (vv.y * c) / 2.0));
  ans[6] = p;
  ans[6] = translate(ans[6], vec((vv.x * a) / 2.0, (vv.y * a) / 2.0));
  vv = rotate(vv, 270);
  ans[3] = ans[2];
  ans[3] = translate(ans[3], vec((vv.x * d), (vv.y * d)));
  ans[4] = ans[5];
  ans[4] = translate(ans[4], vec((vv.x * d), (vv.y * d)));
  for (int i = 0; i < (int)(7); i++) {
    printf("%.10f %.10f\n", ans[i].x, ans[i].y);
  }
}
int main() {
  int TC = 1;
  for (int ZZ = 1; ZZ <= TC; ZZ++) {
    solve();
  }
  return 0;
}

```