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>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
struct Point {
  long double x, y;
};
Point s, p;
long double vp, v, r, rad;
long double len2(Point& p) { return p.x * p.x + p.y * p.y; }
long double dist(Point& p1, Point& p2) {
  return sqrtl(
      fabsl((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y)));
}
long double acos1(long double an) {
  if (an < 0) an = 0;
  if (an > 1) an = 1;
  return acosl(an);
}
long double func(Point& p1, Point& p2, long double t) {
  Point p;
  p.x = p1.x + t * (p2.x - p1.x);
  p.y = p1.y + t * (p2.y - p1.y);
  return len2(p);
}
long double dist_segm(Point p1, Point p2) {
  long double L = 0, R = 1;
  for (int it = 0; it < int(80); it++) {
    long double m1 = L + (R - L) / 3;
    long double m2 = R - (R - L) / 3;
    if (func(p1, p2, m1) < func(p1, p2, m2))
      R = m2;
    else
      L = m1;
  }
  return sqrtl(func(p1, p2, (L + R) / 2));
}
long double get_angle(Point p1, Point p2) {
  long double a = atan2l(p1.y, p1.x) - atan2l(p2.y, p2.x);
  while (a < 0) a += 2 * 3.1415926535897932;
  while (a > 2 * 3.1415926535897932) a -= 2 * 3.1415926535897932;
  return min(a, 2 * 3.1415926535897932 - a);
}
bool can(long double t) {
  long double a = (t * vp) / rad;
  Point cur;
  cur.x = p.x * cosl(a) - p.y * sinl(a);
  cur.y = p.x * sinl(a) + p.y * cosl(a);
  if (dist_segm(s, cur) >= r) {
    return dist(s, cur) < t * v;
  }
  long double an = get_angle(s, cur) - acos1(r / sqrtl(s.x * s.x + s.y * s.y)) -
                   acosl(r / rad);
  return sqrtl(fabsl(s.x * s.x + s.y * s.y - r * r)) +
             sqrtl(fabsl(rad * rad - r * r)) + an * r <
         t * v;
}
int main() {
  cin >> p.x >> p.y >> vp;
  cin >> s.x >> s.y >> v >> r;
  rad = sqrtl(len2(p));
  long double L = 0, R = 1e+12;
  for (int it = 0; it < int(80); it++) {
    long double mid = (L + R) / 2;
    if (can(mid))
      R = mid;
    else
      L = mid;
  }
  cout.precision(10);
  cout << fixed;
  cout << (L + R) / 2 << endl;
  return 0;
}