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 long LINF = 1e18 + 7;
const int N = 2e3 + 7;
const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
const double PI = acos(-1.0);
const double EPS = 1e-9;
template <typename T>
inline T sqr(T x) {
  return x * x;
}
struct Node {
  double x, y;
  Node() {}
  Node(double _x, double _y) { x = _x, y = _y; }
  Node operator+(const Node &p) const { return Node(x + p.x, y + p.y); }
  Node operator-(const Node &p) const { return Node(x - p.x, y - p.y); }
  double operator^(const Node &p) const { return x * p.y - y * p.x; }
  double operator*(const Node &p) const { return x * p.x + y * p.y; }
  double dis() { return sqrt(sqr(x) + sqr(y)); }
  double dis2() { return sqr(x) + sqr(y); }
};
int xp, yp, vp;
int x, y, v, r;
double R;
int sign(double x) {
  if (fabs(x) < EPS) return 0;
  return x > 0 ? 1 : -1;
}
double cross(Node a, Node b) { return a.x * b.y - a.y * b.x; }
double cross(Node a, Node b, Node c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
double dot(Node a, Node b, Node c) {
  return (b.x - a.x) * (c.x - a.x) + (b.y - a.y) * (c.y - a.y);
}
int calc(Node a, Node b, double r) {
  double len = (a - b).dis();
  double d = fabs(cross(a, b)) / len;
  if (sign(d - r) >= 0) return -1;
  Node vec, o(0, 0);
  vec = (sign(cross(a, b, Node(0, 0))) < 0 ? b - a : a - b);
  vec = Node(-vec.y, vec.x);
  vec.x *= d / len, vec.y *= d / len;
  Node add = b - a;
  double tmp = sqrt(sqr(r) - sqr(d)) / len;
  add.x *= tmp, add.y *= tmp;
  Node tmp1 = vec + add, tmp2 = vec - add;
  int flag1 = sign(dot(tmp1, a, b)) < 0;
  int flag2 = sign(dot(tmp2, a, b)) < 0;
  return flag1 + flag2;
}
bool check(double T) {
  double t;
  double w = vp / R * T;
  double xb = xp * cos(w) - yp * sin(w), yb = xp * sin(w) + yp * cos(w);
  double ab = sqrt(sqr(x - xb) + sqr(y - yb));
  double d = fabs((Node(0, 0) - Node(x, y)) ^ (Node(xb, yb) - Node(x, y))) / ab;
  if (calc(Node(x, y), Node(xb, yb), r) < 2) {
    t = ab / v;
  } else {
    double oa = Node(x, y).dis(), ob = Node(xb, yb).dis();
    double ac = sqrt(sqr(x) + sqr(y) - sqr(r)),
           bd = sqrt(sqr(xb) + sqr(yb) - sqr(r));
    double aob =
        acos((sqr(x) + sqr(y) + sqr(xb) + sqr(yb) - sqr(x - xb) - sqr(y - yb)) /
             (2.0 * oa * ob));
    double the = aob - acos(r / oa) - acos(r / ob);
    t = (ac + bd + r * the) / v;
  }
  return t + EPS <= T;
}
double solve() {
  R = sqrt(sqr(xp) + sqr(yp));
  double l = 0, r = 1e9;
  for (int time = (0); time < (1000); ++time) {
    double m = (l + r) / 2.0;
    check(m) ? r = m : l = m;
  }
  return l;
}
int main() {
  scanf("%d%d%d", &xp, &yp, &vp);
  scanf("%d%d%d%d", &x, &y, &v, &r);
  printf("%.10f", solve());
  return 0;
}