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;
struct node {
  double x, y;
};
struct Line {
  double A, B, C;
};
double Pi = 3.14159265354;
double eps = 1e-12;
node Origin;
int cmp(double x) {
  if (fabs(x) <= eps) return 0;
  if (x > eps) return 1;
  return -1;
}
double det(node a, node b, node c) {
  return (b.x - a.x) * (c.y - a.y) - (c.x - a.x) * (b.y - a.y);
}
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);
}
void get(node m1, node m2, double &a1, double &b1, double &c1) {
  a1 = m1.y - m2.y;
  b1 = m2.x - m1.x;
  c1 = m1.x * m2.y - m2.x * m1.y;
}
node getcross(double a1, double b1, double c1, double a2, double b2,
              double c2) {
  node ans;
  ans.x = (b1 * c2 - b2 * c1) / (a1 * b2 - a2 * b1);
  ans.y = (a1 * c2 - a2 * c1) / (b1 * a2 - b2 * a1);
  return ans;
}
int cross(node a, node b, node c, node d) {
  double l1, r1, l2, r2;
  l1 = min(a.x, b.x);
  r1 = max(a.x, b.x);
  l2 = min(c.x, d.x);
  r2 = max(c.x, d.x);
  if (r1 < l2 || r2 < l1) return 0;
  l1 = min(c.y, d.y);
  r1 = max(c.y, d.y);
  l2 = min(c.y, d.y);
  r2 = max(c.y, d.x);
  if (r1 < l2 || r2 < l1) return 0;
  if (cmp(det(a, c, b)) * cmp(det(a, b, d)) < 0) return 0;
  if (cmp(det(c, a, d)) * cmp(det(c, d, b)) < 0) return 0;
  return 1;
}
node Rotate(node p, double angle) {
  node res;
  res.x = p.x * cos(angle) - p.y * sin(angle);
  res.y = p.x * sin(angle) + p.y * cos(angle);
  return res;
}
void Tangent_Line(node poi, node o, double r, node &r1, node &r2) {
  double line =
      sqrt((poi.x - o.x) * (poi.x - o.x) + (poi.y - o.y) * (poi.y - o.y));
  double angle = acos(r / line);
  node unitvector, lin;
  lin.x = poi.x - o.x;
  lin.y = poi.y - o.y;
  unitvector.x = lin.x / sqrt(lin.x * lin.x + lin.y * lin.y) * r;
  unitvector.y = lin.y / sqrt(lin.x * lin.x + lin.y * lin.y) * r;
  r1 = Rotate(unitvector, -angle);
  r2 = Rotate(unitvector, angle);
  r1.x += o.x;
  r1.y += o.y;
  r2.x += o.x;
  r2.y += o.y;
  return;
}
double dis(node A, node B) {
  return sqrt(((A.x - B.x) * (A.x - B.x)) + ((A.y - B.y) * (A.y - B.y)));
}
double work(node a, node b, double r) {
  node o;
  o.x = o.y = 0;
  double A = dis(a, o);
  double B = dis(b, o);
  double C = dis(a, b);
  double theta = acos((((A) * (A)) + ((B) * (B)) - ((C) * (C))) / 2.0 / A / B);
  theta = min(theta, 2 * 3.1415926535897932384626433 - theta);
  return theta * r;
}
int Cross(node a, node b, double r) {
  if (cmp(dot(a, Origin, b)) <= 0) return 0;
  if (cmp(dot(b, Origin, a)) <= 0) return 0;
  Line tmp;
  get(a, b, tmp.A, tmp.B, tmp.C);
  if (fabs(tmp.C) / sqrt(((tmp.A) * (tmp.A)) + ((tmp.B) * (tmp.B))) < r - eps)
    return 1;
  return 0;
}
int main() {
  double Vp, v, R, r;
  node P, M;
  cin >> P.x >> P.y >> Vp;
  cin >> M.x >> M.y >> v >> r;
  R = sqrt(((P.x) * (P.x)) + ((P.y) * (P.y)));
  Origin.x = Origin.y = 0;
  double lo = 0, hi = 1e20;
  for (int lp = 1; lp <= 100; lp++) {
    double mid = (lo + hi) / 2, ans;
    node cur = P;
    cur = Rotate(cur, mid / R * Vp);
    if (!Cross(M, cur, r))
      ans = dis(cur, M);
    else {
      node v1[2], v2[2];
      ans = 1e40;
      Tangent_Line(cur, Origin, r, v1[0], v1[1]);
      Tangent_Line(M, Origin, r, v2[0], v2[1]);
      for (int p = 0; p < 2; p++)
        for (int q = 0; q < 2; q++) {
          double u = dis(M, v2[q]) + work(v2[q], v1[p], r) + dis(v1[p], cur);
          ans = min(ans, u);
        }
    }
    if (ans / v <= mid + eps)
      hi = mid;
    else
      lo = mid;
  }
  printf("%.10f\n", lo);
  return 0;
}