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;
template <typename T, typename TT>
ostream &operator<<(ostream &s, pair<T, TT> t) {
  return s << "(" << t.first << "," << t.second << ")";
}
template <typename T>
ostream &operator<<(ostream &s, vector<T> t) {
  s << "{";
  for (int i = 0; i < t.size(); i++)
    s << t[i] << (i == t.size() - 1 ? "" : ",");
  return s << "}" << endl;
}
const long double eps = 1e-9;
inline bool iszero(long double x) { return x <= eps && x >= -eps; }
struct pt {
  long double x;
  long double y;
  pt() { x = y = 0.0; }
  pt(long double _x, long double _y) : x(_x), y(_y) {}
  bool operator==(pt &a) { return iszero(a.x - x) && iszero(a.y - y); }
};
ostream &operator<<(ostream &s, pt pt1) {
  return s << "(" << pt1.x << "," << pt1.y << ")";
}
istream &operator>>(istream &s, pt &pt1) {
  long double x, y;
  s >> x >> y;
  pt1 = pt(x, y);
  return s;
}
bool operator<(const pt &a, const pt &b) {
  if (a.x < b.x) return 1;
  if (a.x > b.x) return 0;
  return a.y < b.y;
}
pt operator+(const pt &a, const pt &b) { return pt(a.x + b.x, a.y + b.y); }
pt operator-(const pt &a, const pt &b) { return pt(a.x - b.x, a.y - b.y); }
pt operator*(const pt &a, const pt &b) {
  return pt(a.x * b.x - a.y * b.y, b.x * a.y + b.y * a.x);
}
pt cnj(pt a) { return pt(a.x, -a.y); }
pt operator*(long double r, const pt &a) { return pt(a.x * r, a.y * r); }
pt operator*(const pt &a, long double r) { return pt(a.x * r, a.y * r); }
pt operator/(const pt &a, long double r) { return pt(a.x / r, a.y / r); }
long double sqabs(const pt &a) { return a.x * a.x + a.y * a.y; }
long double abs(const pt &a) { return sqrt(a.x * a.x + a.y * a.y); }
long double dist(const pt &a, const pt &b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
long double sqdist(const pt &a, const pt &b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
pt operator/(const pt &a, const pt &b) { return (a * cnj(b)) / sqabs(b); }
long double arg(const pt &a) { return atan2(a.y, a.x); }
long double skal(const pt &a, const pt &b) { return a.x * b.x + a.y * b.y; }
long double vec(const pt &a, const pt &b) { return a.x * b.y - a.y * b.x; }
long double det(const pt &a, const pt &b, const pt &c) {
  return vec(b - a, c - a);
}
long double dist(const pt &a, const pt &b, const pt &c) {
  return abs(det(b, c, a)) / dist(b, c);
}
pt rzut(const pt &a, const pt &b, const pt &c) {
  pt d = c - b;
  return b + d * skal(a - b, d) / sqabs(d);
}
vector<pt> circle_cross(pt c1, long double c1r, pt c2, long double c2r) {
  vector<pt> r;
  c2.x -= c1.x;
  c2.y -= c1.y;
  if (iszero(c2.x) && iszero(c2.y)) return r;
  long double A = (-c2r * c2r + c1r * c1r + c2.x * c2.x + c2.y * c2.y) / 2.0;
  if (iszero(c2.y)) {
    long double x = A / c2.x, y2 = c1r * c1r - x * x;
    if (y2 < -eps) return r;
    if (iszero(y2))
      r.push_back(pt(c1.x + x, c1.y));
    else {
      r.push_back(pt(c1.x + x, c1.y + sqrt(y2)));
      r.push_back(pt(c1.x + x, c1.y - sqrt(y2)));
    }
    return r;
  }
  long double a = sqabs(c2);
  long double b = -2.0 * A * c2.x;
  long double c = A * A - c1r * c1r * c2.y * c2.y;
  long double d = b * b - 4.0 * a * c;
  if (d < -eps) return r;
  long double x = -b / (2.0 * a);
  if (iszero(d))
    r.push_back(pt(c1.x + x, c1.y + (A - c2.x * x) / c2.y));
  else {
    long double e = sqrt(d) / (2.0 * a);
    r.push_back(pt(c1.x + x + e, c1.y + (A - c2.x * (x + e)) / c2.y));
    r.push_back(pt(c1.x + x - e, c1.y + (A - c2.x * (x - e)) / c2.y));
  }
  return r;
}
vector<pt> tang(pt c, long double r, pt z) {
  long double d = dist(c, z) / 2;
  pt sr = (c + z) * 0.5;
  return circle_cross(c, r, sr, d);
}
double r, R;
pt P, X;
long double vp, v;
pt O(0, 0);
long double odlkat(pt A, pt B) {
  long double a = arg(A), b = arg(B);
  long double mn = 1e30;
  for (int j = -2; j <= 2; j++) (mn) = min((mn), (abs(a + j * 2 * M_PI - b)));
  return mn * r;
}
long double calctime(pt D) {
  if (dist(X, D) < 1e-9) return dist(X, D) / v;
  long double odl = dist(O, X, D);
  pt rz = rzut(O, X, D);
  if (abs(dist(rz, X) + dist(rz, D) - dist(X, D)) > 1e-9 || odl >= r) {
    return dist(X, D) / v;
  }
  vector<pt> t1 = tang(O, r, X);
  vector<pt> t2 = tang(O, r, D);
  if (t1.size() != 2 || t2.size() != 2) {
    cout << 1 / 0;
    assert(0);
  }
  long double trasa = 1e30;
  for (int i = 0; i < t1.size(); i++)
    for (int j = 0; j < t2.size(); j++) {
      long double w = dist(X, t1[i]) + odlkat(t1[i], t2[j]) + dist(t2[j], D);
      (trasa) = min((trasa), (w));
    }
  return trasa / v;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> P >> vp;
  cin >> X >> v >> r;
  R = dist(pt(0, 0), P);
  double lo = 0.0, hi = 10000000.0, mid;
  for (int dsdgsd = 0; dsdgsd < 500; dsdgsd++) {
    mid = (hi + lo) / 2;
    long double t = mid;
    long double s = vp * t;
    s /= R;
    pt eps(cos(s), sin(s));
    pt A = P * eps;
    if (calctime(A) < t)
      hi = mid;
    else
      lo = mid;
  }
  cout << setprecision(10) << fixed << lo;
  return 0;
}