Problem: Qwerty the Ranger arrived to the Diatar system with a very important task. He should deliver a special carcinogen for scientific research to planet Persephone. This is urgent, so Qwerty has to get to the planet as soon as possible. A lost day may fail negotiations as nobody is going to pay for an overdue carcinogen.

You can consider Qwerty's ship, the planet Persephone and the star Diatar points on a plane. Diatar is located in the origin of coordinate axes — at point (0, 0). Persephone goes round Diatar along a circular orbit with radius R in the counter-clockwise direction at constant linear speed vp (thus, for instance, a full circle around the star takes <image> of time). At the initial moment of time Persephone is located at point (xp, yp).

At the initial moment of time Qwerty's ship is at point (x, y). Qwerty can move in any direction at speed of at most v (v > vp). The star Diatar is hot (as all stars), so Qwerty can't get too close to it. The ship's metal sheathing melts at distance r (r < R) from the star.

Find the minimum time Qwerty needs to get the carcinogen to planet Persephone.

Input

The first line contains space-separated integers xp, yp and vp ( - 104 ≤ xp, yp ≤ 104, 1 ≤ vp < 104) — Persephone's initial position and the speed at which it goes round Diatar.

The second line contains space-separated integers x, y, v and r ( - 104 ≤ x, y ≤ 104, 1 < v ≤ 104, 1 ≤ r ≤ 104) — The intial position of Qwerty's ship, its maximum speed and the minimum safe distance to star Diatar.

It is guaranteed that r2 < x2 + y2, r2 < xp2 + yp2 and vp < v.

Output

Print a single real number — the minimum possible delivery time. The answer will be considered valid if its absolute or relative error does not exceed 10 - 6.

Examples

Input

10 0 1
-10 0 2 8


Output

9.584544103

Input

50 60 10
50 60 20 40


Output

0.000000000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
const long double PI2 = PI * 2;
const long double EPS = 1E-12;
bool zero(long double x) { return -EPS < x && x < EPS; }
struct Point {
  long double x, y;
  Point() {}
  Point(long double x, long double y) : x(x), y(y) {}
  void init() { scanf("%Lf%Lf", &x, &y); }
  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 scale) const {
    return Point(x * scale, y * scale);
  }
  Point operator/(const long double scale) const {
    return Point(x / scale, y / scale);
  }
  long double operator*(const Point &rhs) const {
    return x * rhs.y - rhs.x * y;
  }
  long double length2() const { return x * x + y * y; }
  long double length() const { return sqrt(this->length2()); }
  long double angle() const { return atan2(y, x); }
};
const Point ZERO = Point(0, 0);
Point planet, ship;
long double vp, rp, ap, T;
long double v, r, a;
long double R;
void init() {
  rp = planet.length();
  ap = planet.angle();
  r = ship.length();
  a = ship.angle();
}
Point intersection(const Point &u1, const Point &u2, const Point &v1,
                   const Point &v2) {
  return u1 + (u2 - u1) * (((u1 - v1) * (v1 - v2)) / ((u1 - u2) * (v1 - v2)));
}
Point ptoline(const Point &p, const Point &l1, const Point &l2) {
  Point t = p;
  t.x += l1.y - l2.y;
  t.y += l2.x - l1.x;
  return intersection(p, t, l1, l2);
}
bool dotOnlineIn(const Point &p, const Point &l1, const Point &l2) {
  return (l1.x - p.x) * (l2.x - p.x) <= 0 && (l1.y - p.y) * (l2.y - p.y) <= 0;
}
long double fix(long double angle) {
  angle = fmod(angle, PI2);
  if (angle < -PI) return angle + PI2;
  if (angle > PI) return angle - PI2;
  return angle;
}
vector<pair<long double, Point> > getPoints(const Point &p) {
  vector<pair<long double, Point> > res(2);
  long double angle = p.angle(), delta = acos(R / p.length());
  res[0] = make_pair(fix(angle + delta),
                     Point(cos(angle + delta), sin(angle + delta)) * R);
  res[1] = make_pair(fix(angle - delta),
                     Point(cos(angle - delta), sin(angle - delta)) * R);
  return res;
}
long double diffAngle(long double x, long double y) {
  long double res = fmod(x > y ? x - y : y - x, PI2);
  return res > PI ? PI2 - res : res;
}
long double shipTime(long double angle) {
  Point dest = Point(cos(angle), sin(angle)) * rp;
  Point p = ptoline(ZERO, dest, ship);
  if (!dotOnlineIn(p, dest, ship) || (p - ZERO).length() > R) {
    return (dest - ship).length() / v;
  }
  vector<pair<long double, Point> > v1 = getPoints(dest), v2 = getPoints(ship);
  long double res = 1E100;
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 2; j++) {
      res = min(res, (dest - v1[i].second).length() +
                         (ship - v2[j].second).length() +
                         R * diffAngle(v1[i].first, v2[j].first));
    }
  }
  return res / v;
}
long double calc() {
  long double mmin = shipTime(a);
  ap = fix(ap + mmin * vp / rp);
  long double res = 1E100;
  long double lower, upper, angle;
  lower = 0;
  upper = PI;
  angle = a < ap ? a + PI2 - ap : a - ap;
  for (int loops = 0; loops < 100; loops++) {
    long double medium = (lower + upper) / 2;
    long double T = shipTime(a + medium) - mmin;
    if (medium + T * vp / rp < angle) {
      lower = medium;
    } else {
      upper = medium;
    }
  }
  res = min(res, shipTime(a + (lower + upper) / 2));
  lower = 0;
  upper = PI;
  angle = ap < a ? ap + PI2 - a : ap - a;
  for (int loops = 0; loops < 100; loops++) {
    long double medium = (lower + upper) / 2;
    long double T = shipTime(a + medium) - mmin;
    if (medium - T * vp / rp < angle) {
      lower = medium;
    } else {
      upper = medium;
    }
  }
  return min(res, shipTime(a + (lower + upper) / 2));
}
int main() {
  planet.init();
  scanf("%Lf", &vp);
  ship.init();
  scanf("%Lf%Lf", &v, &R);
  init();
  printf("%.16Lf\n", calc());
  return 0;
}