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;
template <class T>
T binarySearch(vector<T> stuff, int (*comparator)(T a)) {
  int lowerBound = 0;
  int upperBound = stuff.size();
  while (lowerBound != upperBound) {
    int index = (lowerBound + upperBound) / 2;
    int result = comparator(stuff[index]);
    if (result < 0) {
      if (index == lowerBound) index++;
      lowerBound = index;
    } else if (result > 0) {
      if (index == upperBound) index--;
      upperBound = index;
    } else {
      return stuff[index];
    }
  }
  return stuff[lowerBound];
}
long long fastExp(long long base, long long exp) {
  if (exp == 1) return base;
  if ((exp & 1) == 1) {
    long long n = fastExp(base, ((exp - 1) >> 1));
    return base * n * n;
  }
  auto n = fastExp(base, (exp >> 1));
  return n * n;
}
long long fastExpModN(long long base, long long exp, long long modN) {
  if (exp == 1) return base;
  if ((exp & 1) == 1) {
    long long n = fastExp(base, ((exp - 1) >> 1));
    return (base * n * n) % modN;
  }
  long long n = fastExp(base, (exp >> 1));
  return (n * n) % modN;
}
long long combinatoryNumberModN(long long n, long long k, long long modN) {
  if (n == k) return 1;
  if (k == 0) return 1;
  return (combinatoryNumberModN(n - 1, k, modN) +
          combinatoryNumberModN(n - 1, k - 1, modN)) %
         modN;
}
long long combinatoryNumber(long long n, long long k) {
  if (n == k) return 1;
  if (k == 0) return 1;
  return combinatoryNumber(n - 1, k) + combinatoryNumber(n - 1, k - 1);
}
long long gcd(long long a, long long b) { return (a == 0) ? b : gcd(b % a, a); }
bool primes[10000];
void executeCriba() {
  memset(primes, 1, 10000);
  for (int i = 2; i < 10000; i++) {
    if (primes[i] == true) {
      int k = 1;
      while (k * i + i < 10000) {
        primes[k * i + i] = false;
        k++;
      }
    }
  }
}
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) : x(_x), y(_y) {}
  Point operator*(double d) { return Point(x * d, y * d); }
  Point operator+(const Point& p) const { return Point(p.x + x, p.y + y); }
  Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); }
  Point operator/(double lambda) const { return Point(x / lambda, y / lambda); }
  Point normalize() { return Point(x, y) / longitude(); }
  double scalarP(Point& p) { return p.x * x + p.y * y; }
  double longitude() const { return sqrt(x * x + y * y); }
  double euclideanDist(Point& p) const {
    double dx = p.x - x;
    double dy = p.y - y;
    return sqrt(dx * dx + dy * dy);
  }
  double euclideanDist2(Point& p) const {
    double dx = p.x - x;
    double dy = p.y - y;
    return dx * dx + dy * dy;
  }
  double crossProduct(Point p) const { return x * p.y - p.x * y; }
  bool operator()(Point& p1, Point& p2) { return p1.y < p2.y; }
};
bool comparatorX(const Point& p1, const Point& p2) { return p1.x < p2.x; }
bool comparatorY(const Point& p1, const Point& p2) { return p1.y < p2.y; }
pair<Point, Point> closestPoints(vector<Point> p) {
  sort(p.begin(), p.end(), comparatorX);
  double d = DBL_MAX;
  pair<Point, Point> best({p[0], p[1]});
  set<Point, bool (*)(const Point& a, const Point& b)> ps(&comparatorY);
  ps.insert(p[0]);
  long long int leftI = 0;
  for (int i = 1; i < p.size(); i++) {
    while (leftI < i && (p[i].x - p[leftI].x) > d) ps.erase(p[leftI++]);
    auto ly = ps.lower_bound(Point(p[i].x, p[i].y - d));
    while (ly->y < p[i].y + d && ly != ps.end()) {
      if (ly->euclideanDist2(p[i]) < d) {
        d = (*ly).euclideanDist2(p[i]);
        best = {(*ly), p[i]};
      }
      ly++;
    }
    ps.insert(p[i]);
  }
  return best;
}
struct Event {
  static const int APERTURE = 0;
  static const int CLOSURE = 1;
  static const int VERTICAL_LINE = 2;
  int type;
  Point st, ep;
  Event() {}
  Event(Point p1, Point p2, int t) : st(p1), ep(p2), type(t) {}
};
bool comparatorEv(const Event& ev1, const Event& ev2) {
  if (ev1.st.x == ev2.st.x) return ev1.type == Event::VERTICAL_LINE;
  return ev1.st.x < ev2.st.x;
}
vector<Point> lineIntersections(vector<pair<Point, Point> > lines) {
  vector<Point> intersections;
  vector<Event> events;
  for (int i = 0; i < lines.size(); i++) {
    if (lines[i].first.x == lines[i].second.x) {
      if (lines[i].first.y > lines[i].second.y)
        events.push_back(
            Event(lines[i].second, lines[i].first, Event::VERTICAL_LINE));
      else
        events.push_back(
            Event(lines[i].first, lines[i].second, Event::VERTICAL_LINE));
    } else {
      if (lines[i].first.x > lines[i].second.x) {
        Point backup = lines[i].first;
        lines[i].first = lines[i].second;
        lines[i].second = backup;
      }
      events.push_back(Event(lines[i].first, lines[i].second, Event::APERTURE));
      events.push_back(Event(lines[i].second, lines[i].first, Event::CLOSURE));
    }
  }
  sort(events.begin(), events.end(), comparatorEv);
  set<Point, bool (*)(const Point&, const Point&)> activePoints(comparatorY);
  for (int i = 0; i < events.size(); i++) {
    if (events[i].type == Event::APERTURE)
      activePoints.insert(events[i].st);
    else if (events[i].type == Event::CLOSURE)
      activePoints.erase(events[i].ep);
    else if (events[i].type == Event::VERTICAL_LINE)
      for (auto lowerB = activePoints.lower_bound(events[i].st);
           lowerB->y < events[i].ep.y && lowerB != activePoints.end(); lowerB++)
        intersections.push_back(Point(events[i].st.x, lowerB->y));
  }
  return intersections;
}
vector<Point> convexHull(vector<Point> points) {
  Point bottomP = *min_element(points.begin(), points.end(), comparatorY);
  auto comp = [bottomP](const Point& p1, const Point& p2) -> bool {
    Point v1 = p1 - bottomP;
    Point v2 = p2 - bottomP;
    int orientation = v1.crossProduct(v2);
    if (orientation == 0) {
      double d1 = v1.longitude();
      double d2 = v2.longitude();
      return d1 < d2;
    }
    return orientation > 0;
  };
  sort(points.begin(), points.end(), comp);
  vector<Point> polygonP = {points[0], points[1]};
  points.erase(points.begin(), points.begin() + 2);
  int last = 1;
  for (Point& p : points) {
    while ((p - polygonP[last - 1])
               .crossProduct(polygonP[last - 1] - polygonP[last]) < 0) {
      polygonP.pop_back();
      last--;
    }
    polygonP.push_back(p);
    last++;
  }
  return polygonP;
}
void solve() {
  float px, py, vx, vy, a, b, c, d;
  cin >> px >> py >> vx >> vy >> a >> b >> c >> d;
  Point p(vx, vy);
  Point l(px, py);
  p = p.normalize();
  Point pb = p * b + l;
  Point np = Point(p.y, -p.x);
  Point pa1 = np * (a / 2) + l;
  Point pa2 = (np * (-1)) * (a / 2) + l;
  Point l1 = l + np * (c / 2);
  Point l2 = l - np * (c / 2);
  Point pc1 = l1 - p * d;
  Point pc2 = l2 - p * d;
  cout << setprecision(15) << pb.x << " " << pb.y << "\n";
  cout << pa2.x << " " << pa2.y << "\n";
  cout << l2.x << " " << l2.y << "\n";
  cout << pc2.x << " " << pc2.y << "\n";
  cout << pc1.x << " " << pc1.y << "\n";
  cout << l1.x << " " << l1.y << "\n";
  cout << pa1.x << " " << pa1.y << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin.tie(NULL);
  setprecision(15);
  solve();
}