#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vd = vector<double>;
using vs = vector<string>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
using vpii = vector<pii>;
using vvpii = vector<vpii>;
using vpll = vector<pll>;
using vvpll = vector<vpll>;
using vpdd = vector<pdd>;
using vvpdd = vector<vpdd>;
template <typename T>
void ckmin(T& a, const T& b) {
  a = min(a, b);
}
template <typename T>
void ckmax(T& a, const T& b) {
  a = max(a, b);
}
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
namespace __input {
template <class T1, class T2>
void re(pair<T1, T2>& p);
template <class T>
void re(vector<T>& a);
template <class T, size_t SZ>
void re(array<T, SZ>& a);
template <class T>
void re(T& x) {
  cin >> x;
}
void re(double& x) {
  string t;
  re(t);
  x = stod(t);
}
template <class Arg, class... Args>
void re(Arg& first, Args&... rest) {
  re(first);
  re(rest...);
}
template <class T1, class T2>
void re(pair<T1, T2>& p) {
  re(p.first, p.second);
}
template <class T>
void re(vector<T>& a) {
  for (int i = 0; i < (int((a).size())); i++) re(a[i]);
}
template <class T, size_t SZ>
void re(array<T, SZ>& a) {
  for (int i = 0; i < (SZ); i++) re(a[i]);
}
}  // namespace __input
using namespace __input;
namespace __output {
template <class T1, class T2>
void pr(const pair<T1, T2>& x);
template <class T, size_t SZ>
void pr(const array<T, SZ>& x);
template <class T>
void pr(const vector<T>& x);
template <class T>
void pr(const deque<T>& x);
template <class T>
void pr(const set<T>& x);
template <class T1, class T2>
void pr(const map<T1, T2>& x);
template <class T>
void pr(const T& x) {
  cout << x;
}
template <class Arg, class... Args>
void pr(const Arg& first, const Args&... rest) {
  pr(first);
  pr(rest...);
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x) {
  pr("{", x.first, ", ", x.second, "}");
}
template <class T, bool pretty = true>
void prContain(const T& x) {
  if (pretty) pr("{");
  bool fst = 1;
  for (const auto& a : x) pr(!fst ? pretty ? ", " : " " : "", a), fst = 0;
  if (pretty) pr("}");
}
template <class T>
void pc(const T& x) {
  prContain<T, false>(x);
  pr("\n");
}
template <class T, size_t SZ>
void pr(const array<T, SZ>& x) {
  prContain(x);
}
template <class T>
void pr(const vector<T>& x) {
  prContain(x);
}
template <class T>
void pr(const deque<T>& x) {
  prContain(x);
}
template <class T>
void pr(const set<T>& x) {
  prContain(x);
}
template <class T1, class T2>
void pr(const map<T1, T2>& x) {
  prContain(x);
}
void ps() { pr("\n"); }
template <class Arg>
void ps(const Arg& first) {
  pr(first);
  ps();
}
template <class Arg, class... Args>
void ps(const Arg& first, const Args&... rest) {
  pr(first, " ");
  ps(rest...);
}
}  // namespace __output
using namespace __output;
namespace __algorithm {
template <typename T>
void dedup(vector<T>& v) {
  sort((v).begin(), (v).end());
  v.erase(unique((v).begin(), (v).end()), v.end());
}
template <typename T>
typename vector<T>::iterator find(vector<T>& v, const T& x) {
  auto it = lower_bound((v).begin(), (v).end(), x);
  return it != v.end() && *it == x ? it : v.end();
}
template <typename T>
size_t index(vector<T>& v, const T& x) {
  auto it = find(v, x);
  assert(it != v.end() && *it == x);
  return it - v.begin();
}
template <typename C, typename T, typename OP>
vector<T> prefixes(const C& v, T id, OP op) {
  vector<T> r(int((v).size()) + 1, id);
  for (int i = 0; i < (int((v).size())); i++) r[i + 1] = op(r[i], v[i]);
  return r;
}
template <typename C, typename T, typename OP>
vector<T> suffixes(const C& v, T id, OP op) {
  vector<T> r(int((v).size()) + 1, id);
  for (int i = (int((v).size())) - 1; i >= 0; i--) r[i] = op(v[i], r[i + 1]);
  return r;
}
}  // namespace __algorithm
using namespace __algorithm;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
struct monostate {
  friend istream& operator>>(istream& is, const monostate& ms) { return is; }
  friend ostream& operator<<(ostream& os, const monostate& ms) { return os; }
  friend monostate operator+(const monostate& a, const monostate& b) {
    return a;
  }
} ms;
#pragma GCC diagnostic pop
namespace __io {
void setIn(string second) { freopen(second.c_str(), "r", stdin); }
void setOut(string second) { freopen(second.c_str(), "w", stdout); }
void setIO(string second = "") {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(15);
  if (int((second).size())) {
    setIn(second + ".in"), setOut(second + ".out");
  }
}
}  // namespace __io
using namespace __io;
template <typename T>
struct point {
  T x, y;
  point() : x(0), y(0) {}
  point(T _x, T _y) : x(_x), y(_y) {}
  friend istream& operator>>(istream& i, point& p) { return i >> p.x >> p.y; }
  friend ostream& operator<<(ostream& o, const point& p) {
    return o << "(" << p.x << ", " << p.y << ")";
  }
  T norm() const { return x * x + y * y; }
  double len() const { return sqrt(norm()); }
  double ang() const { return atan2(y, x); }
  point<T> conj() const { return {x, -y}; }
  point& operator+=(const point& o) {
    x += o.x;
    y += o.y;
    return *this;
  }
  point& operator-=(const point& o) {
    x -= o.x;
    y -= o.y;
    return *this;
  }
  point& operator*=(const T& c) {
    x *= c;
    y *= c;
    return *this;
  }
  point& operator/=(const T& c) {
    x /= c;
    y /= c;
    return *this;
  }
  friend point operator+(const point& a, const point& b) {
    return point(a) += b;
  }
  friend point operator-(const point& a, const point& b) {
    return point(a) -= b;
  }
  friend point operator*(const point& a, const T& c) { return point(a) *= c; }
  friend point operator*(const T& c, const point& a) { return point(a) *= c; }
  friend point operator/(const point& a, const T& c) { return point(a) /= c; }
  bool operator==(const point& o) const { return x == o.x && y == o.y; }
  bool operator!=(const point& o) const { return x != o.x || y != o.y; }
  bool operator<(const point& o) const {
    return (x != o.x) ? x < o.x : y < o.y;
  }
  bool operator>(const point& o) const {
    return (x != o.x) ? x > o.x : y > o.y;
  }
  bool operator<=(const point& o) const { return !(*this > o); }
  friend T dot(const point& a, const point& b) { return a.x * b.x + a.y * b.y; }
  friend T cross(const point& a, const point& b) {
    return a.x * b.y - a.y * b.x;
  }
  friend T cross(const point& p, const point& a, const point& b) {
    return cross(a - p, b - p);
  }
  friend point<T> operator*(const point& a, const point& b) {
    return {a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x};
  }
  friend point<T> operator/(const point& a, const point& b) {
    return a * b.conj() / b.norm();
  }
  point dir() const { return point(*this) / len(); }
  point rotate(const double& ang) const {
    return *this * point(cos(ang), sin(ang));
  }
  T dist(const point& a) const { return (a - *this).len(); }
  T dist(const point& a, const point& b) {
    return abs(cross(*this, a, b)) / a.dist(b);
  }
  point reflect(const point& a, const point& b) const {
    return a + ((*this - a) / (b - a)).conj() * (b - a);
  }
  point foot(const point& a, const point& b) const {
    return (*this + this->reflect(a, b)) / 2;
  }
  friend point extension(const point& a, const point& b, const point& c,
                         const point& d) {
    T x = cross(a, b, c), y = cross(a, b, d);
    return (d * x - c * y) / (x - y);
  }
  friend vector<point> seg_intersect(point a, point b, point c, point d) {
    if (a > b) swap(a, b);
    if (c > d) swap(c, d);
    T a1 = cross(a, b, c), a2 = cross(a, b, d);
    if (a1 > a2) swap(a1, a2);
    if (!(a1 <= 0 && a2 >= 0)) return {};
    if (a1 == 0 && a2 == 0) {
      if (cross(a, c, d) != 0) return {};
      point<T> x1 = max(a, c), x2 = min(b, d);
      if (x1 > x2) return {};
      if (x1 == x2) return {x1};
      return {x1, x2};
    }
    point<T> z = extension(a, b, c, d);
    if (a <= z && z <= b) return {z};
    return {};
  }
  using polygon = vector<point<T>>;
  friend ostream& operator<<(ostream& o, const polygon& poly) {
    o << "{";
    for (auto pt : poly) o << " " << pt;
    return o << " }";
  }
  string classify(const polygon& p) const {
    bool ans = 0;
    for (int i = 0; i < p.size(); i++) {
      point<T> a = p[i], b = p[(i + 1) % p.size()];
      if (cross(a, b, *this) == 0 && min(a, b) <= *this && *this <= max(a, b))
        return "on";
      if (a.y > b.y) swap(a, b);
      if (a.y <= y && y < b.y && cross(*this, a, b) > 0) ans ^= 1;
    }
    return ans ? "in" : "out";
  }
  friend polygon convex_hull(const vector<point>& pts) {
    point pivot = *min_element((pts).begin(), (pts).end());
    auto sorted = pts;
    sort((sorted).begin(), (sorted).end(),
         [&pivot](const point& p, const point& q) {
           T cp = cross(pivot, p, q);
           if (cp != 0) return cp > 0;
           return pivot.dist(p) < pivot.dist(q);
         });
    int j = 0;
    polygon res(pts.size());
    for (const point& p : sorted) {
      while (j > 1 && cross(res[j - 2], res[j - 1], p) <= 0) j--;
      res[j++] = p;
    }
    res.erase(res.begin() + j, res.end());
    return res;
  }
  friend T area(const polygon& p) {
    T a = 0;
    for (int i = 0; i < int((p).size()); i++)
      a += cross(p[i], p[i + 1 < int((p).size()) ? i + 1 : 0]);
    return a;
  }
};
int main() {
  setIO();
  using pt = point<long double>;
  pt p, v;
  re(p, v);
  v = v.dir();
  vector<pt> out;
  {
    double a, b, c, d;
    re(a, b, c, d);
    out.emplace_back(b, 0);
    out.emplace_back(0, a / 2);
    out.emplace_back(0, c / 2);
    out.emplace_back(-d, c / 2);
    out.emplace_back(-d, -c / 2);
    out.emplace_back(0, -c / 2);
    out.emplace_back(0, -a / 2);
  }
  for (auto& a : out) {
    a = a * v + p;
    ps(a.x, a.y);
  }
  return 0;
}

### Prompt

Create a solution in cpp for 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;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vd = vector<double>;
using vs = vector<string>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
using vpii = vector<pii>;
using vvpii = vector<vpii>;
using vpll = vector<pll>;
using vvpll = vector<vpll>;
using vpdd = vector<pdd>;
using vvpdd = vector<vpdd>;
template <typename T>
void ckmin(T& a, const T& b) {
  a = min(a, b);
}
template <typename T>
void ckmax(T& a, const T& b) {
  a = max(a, b);
}
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
namespace __input {
template <class T1, class T2>
void re(pair<T1, T2>& p);
template <class T>
void re(vector<T>& a);
template <class T, size_t SZ>
void re(array<T, SZ>& a);
template <class T>
void re(T& x) {
  cin >> x;
}
void re(double& x) {
  string t;
  re(t);
  x = stod(t);
}
template <class Arg, class... Args>
void re(Arg& first, Args&... rest) {
  re(first);
  re(rest...);
}
template <class T1, class T2>
void re(pair<T1, T2>& p) {
  re(p.first, p.second);
}
template <class T>
void re(vector<T>& a) {
  for (int i = 0; i < (int((a).size())); i++) re(a[i]);
}
template <class T, size_t SZ>
void re(array<T, SZ>& a) {
  for (int i = 0; i < (SZ); i++) re(a[i]);
}
}  // namespace __input
using namespace __input;
namespace __output {
template <class T1, class T2>
void pr(const pair<T1, T2>& x);
template <class T, size_t SZ>
void pr(const array<T, SZ>& x);
template <class T>
void pr(const vector<T>& x);
template <class T>
void pr(const deque<T>& x);
template <class T>
void pr(const set<T>& x);
template <class T1, class T2>
void pr(const map<T1, T2>& x);
template <class T>
void pr(const T& x) {
  cout << x;
}
template <class Arg, class... Args>
void pr(const Arg& first, const Args&... rest) {
  pr(first);
  pr(rest...);
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x) {
  pr("{", x.first, ", ", x.second, "}");
}
template <class T, bool pretty = true>
void prContain(const T& x) {
  if (pretty) pr("{");
  bool fst = 1;
  for (const auto& a : x) pr(!fst ? pretty ? ", " : " " : "", a), fst = 0;
  if (pretty) pr("}");
}
template <class T>
void pc(const T& x) {
  prContain<T, false>(x);
  pr("\n");
}
template <class T, size_t SZ>
void pr(const array<T, SZ>& x) {
  prContain(x);
}
template <class T>
void pr(const vector<T>& x) {
  prContain(x);
}
template <class T>
void pr(const deque<T>& x) {
  prContain(x);
}
template <class T>
void pr(const set<T>& x) {
  prContain(x);
}
template <class T1, class T2>
void pr(const map<T1, T2>& x) {
  prContain(x);
}
void ps() { pr("\n"); }
template <class Arg>
void ps(const Arg& first) {
  pr(first);
  ps();
}
template <class Arg, class... Args>
void ps(const Arg& first, const Args&... rest) {
  pr(first, " ");
  ps(rest...);
}
}  // namespace __output
using namespace __output;
namespace __algorithm {
template <typename T>
void dedup(vector<T>& v) {
  sort((v).begin(), (v).end());
  v.erase(unique((v).begin(), (v).end()), v.end());
}
template <typename T>
typename vector<T>::iterator find(vector<T>& v, const T& x) {
  auto it = lower_bound((v).begin(), (v).end(), x);
  return it != v.end() && *it == x ? it : v.end();
}
template <typename T>
size_t index(vector<T>& v, const T& x) {
  auto it = find(v, x);
  assert(it != v.end() && *it == x);
  return it - v.begin();
}
template <typename C, typename T, typename OP>
vector<T> prefixes(const C& v, T id, OP op) {
  vector<T> r(int((v).size()) + 1, id);
  for (int i = 0; i < (int((v).size())); i++) r[i + 1] = op(r[i], v[i]);
  return r;
}
template <typename C, typename T, typename OP>
vector<T> suffixes(const C& v, T id, OP op) {
  vector<T> r(int((v).size()) + 1, id);
  for (int i = (int((v).size())) - 1; i >= 0; i--) r[i] = op(v[i], r[i + 1]);
  return r;
}
}  // namespace __algorithm
using namespace __algorithm;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
struct monostate {
  friend istream& operator>>(istream& is, const monostate& ms) { return is; }
  friend ostream& operator<<(ostream& os, const monostate& ms) { return os; }
  friend monostate operator+(const monostate& a, const monostate& b) {
    return a;
  }
} ms;
#pragma GCC diagnostic pop
namespace __io {
void setIn(string second) { freopen(second.c_str(), "r", stdin); }
void setOut(string second) { freopen(second.c_str(), "w", stdout); }
void setIO(string second = "") {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(15);
  if (int((second).size())) {
    setIn(second + ".in"), setOut(second + ".out");
  }
}
}  // namespace __io
using namespace __io;
template <typename T>
struct point {
  T x, y;
  point() : x(0), y(0) {}
  point(T _x, T _y) : x(_x), y(_y) {}
  friend istream& operator>>(istream& i, point& p) { return i >> p.x >> p.y; }
  friend ostream& operator<<(ostream& o, const point& p) {
    return o << "(" << p.x << ", " << p.y << ")";
  }
  T norm() const { return x * x + y * y; }
  double len() const { return sqrt(norm()); }
  double ang() const { return atan2(y, x); }
  point<T> conj() const { return {x, -y}; }
  point& operator+=(const point& o) {
    x += o.x;
    y += o.y;
    return *this;
  }
  point& operator-=(const point& o) {
    x -= o.x;
    y -= o.y;
    return *this;
  }
  point& operator*=(const T& c) {
    x *= c;
    y *= c;
    return *this;
  }
  point& operator/=(const T& c) {
    x /= c;
    y /= c;
    return *this;
  }
  friend point operator+(const point& a, const point& b) {
    return point(a) += b;
  }
  friend point operator-(const point& a, const point& b) {
    return point(a) -= b;
  }
  friend point operator*(const point& a, const T& c) { return point(a) *= c; }
  friend point operator*(const T& c, const point& a) { return point(a) *= c; }
  friend point operator/(const point& a, const T& c) { return point(a) /= c; }
  bool operator==(const point& o) const { return x == o.x && y == o.y; }
  bool operator!=(const point& o) const { return x != o.x || y != o.y; }
  bool operator<(const point& o) const {
    return (x != o.x) ? x < o.x : y < o.y;
  }
  bool operator>(const point& o) const {
    return (x != o.x) ? x > o.x : y > o.y;
  }
  bool operator<=(const point& o) const { return !(*this > o); }
  friend T dot(const point& a, const point& b) { return a.x * b.x + a.y * b.y; }
  friend T cross(const point& a, const point& b) {
    return a.x * b.y - a.y * b.x;
  }
  friend T cross(const point& p, const point& a, const point& b) {
    return cross(a - p, b - p);
  }
  friend point<T> operator*(const point& a, const point& b) {
    return {a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x};
  }
  friend point<T> operator/(const point& a, const point& b) {
    return a * b.conj() / b.norm();
  }
  point dir() const { return point(*this) / len(); }
  point rotate(const double& ang) const {
    return *this * point(cos(ang), sin(ang));
  }
  T dist(const point& a) const { return (a - *this).len(); }
  T dist(const point& a, const point& b) {
    return abs(cross(*this, a, b)) / a.dist(b);
  }
  point reflect(const point& a, const point& b) const {
    return a + ((*this - a) / (b - a)).conj() * (b - a);
  }
  point foot(const point& a, const point& b) const {
    return (*this + this->reflect(a, b)) / 2;
  }
  friend point extension(const point& a, const point& b, const point& c,
                         const point& d) {
    T x = cross(a, b, c), y = cross(a, b, d);
    return (d * x - c * y) / (x - y);
  }
  friend vector<point> seg_intersect(point a, point b, point c, point d) {
    if (a > b) swap(a, b);
    if (c > d) swap(c, d);
    T a1 = cross(a, b, c), a2 = cross(a, b, d);
    if (a1 > a2) swap(a1, a2);
    if (!(a1 <= 0 && a2 >= 0)) return {};
    if (a1 == 0 && a2 == 0) {
      if (cross(a, c, d) != 0) return {};
      point<T> x1 = max(a, c), x2 = min(b, d);
      if (x1 > x2) return {};
      if (x1 == x2) return {x1};
      return {x1, x2};
    }
    point<T> z = extension(a, b, c, d);
    if (a <= z && z <= b) return {z};
    return {};
  }
  using polygon = vector<point<T>>;
  friend ostream& operator<<(ostream& o, const polygon& poly) {
    o << "{";
    for (auto pt : poly) o << " " << pt;
    return o << " }";
  }
  string classify(const polygon& p) const {
    bool ans = 0;
    for (int i = 0; i < p.size(); i++) {
      point<T> a = p[i], b = p[(i + 1) % p.size()];
      if (cross(a, b, *this) == 0 && min(a, b) <= *this && *this <= max(a, b))
        return "on";
      if (a.y > b.y) swap(a, b);
      if (a.y <= y && y < b.y && cross(*this, a, b) > 0) ans ^= 1;
    }
    return ans ? "in" : "out";
  }
  friend polygon convex_hull(const vector<point>& pts) {
    point pivot = *min_element((pts).begin(), (pts).end());
    auto sorted = pts;
    sort((sorted).begin(), (sorted).end(),
         [&pivot](const point& p, const point& q) {
           T cp = cross(pivot, p, q);
           if (cp != 0) return cp > 0;
           return pivot.dist(p) < pivot.dist(q);
         });
    int j = 0;
    polygon res(pts.size());
    for (const point& p : sorted) {
      while (j > 1 && cross(res[j - 2], res[j - 1], p) <= 0) j--;
      res[j++] = p;
    }
    res.erase(res.begin() + j, res.end());
    return res;
  }
  friend T area(const polygon& p) {
    T a = 0;
    for (int i = 0; i < int((p).size()); i++)
      a += cross(p[i], p[i + 1 < int((p).size()) ? i + 1 : 0]);
    return a;
  }
};
int main() {
  setIO();
  using pt = point<long double>;
  pt p, v;
  re(p, v);
  v = v.dir();
  vector<pt> out;
  {
    double a, b, c, d;
    re(a, b, c, d);
    out.emplace_back(b, 0);
    out.emplace_back(0, a / 2);
    out.emplace_back(0, c / 2);
    out.emplace_back(-d, c / 2);
    out.emplace_back(-d, -c / 2);
    out.emplace_back(0, -c / 2);
    out.emplace_back(0, -a / 2);
  }
  for (auto& a : out) {
    a = a * v + p;
    ps(a.x, a.y);
  }
  return 0;
}

```