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 int dx[] = {-1, 0, 0, 1};
const int dy[] = {0, -1, 1, 0};
const long double PI = acos((long double)-1);
const int INF = (int)1E9 + 5;
const double EPS = 1E-11;
const long long MOD = (long long)1E9 + 7;
int ntest = 0, test = 0;
inline void init();
inline void run();
inline void stop() { ntest = test - 1; }
bool exist = false;
int main() {
  init();
  while (++test <= ntest) {
    run();
  }
  return 0;
}
inline void init() { ntest = 1; }
inline int dcmp(long double a, long double b) {
  if (fabs(a - b) < EPS) return 0;
  if (a < b) return -1;
  return 1;
}
long double xp, yp, vp;
long double x, y, v, r;
long double RP, vAngle, initAngle;
const long double TWO_PI = 2 * PI;
inline long double mod(long double angle) {
  angle -= ((long long)(angle / (TWO_PI))) * (TWO_PI);
  while (angle >= TWO_PI) angle -= TWO_PI;
  while (angle < 0) angle += TWO_PI;
  return angle;
}
inline void getPosition(long double t, long double &x, long double &y) {
  long double angle = t * vAngle + initAngle;
  angle = mod(angle);
  x = cos(angle) * RP;
  y = sin(angle) * RP;
}
inline long double distance(long double x1, long double y1, long double x2,
                            long double y2) {
  long double dx = x1 - x2;
  long double dy = y1 - y2;
  return sqrt(dx * dx + dy * dy);
}
inline long double getAngle(long double a, long double b, long double oposite) {
  return acos((a * a + b * b - oposite * oposite) / (2 * a * b));
}
inline long double getLeng(long double a, long double b, long double angle) {
  return sqrt(a * a + b * b - 2 * a * b * cos(angle));
}
inline bool isOk(long double t) {
  long double tx, ty;
  getPosition(t, tx, ty);
  long double ab = distance(x, y, tx, ty);
  long double oa = sqrt(x * x + y * y);
  long double ob = sqrt(tx * tx + ty * ty);
  long double h = fabs(x * ty - y * tx) / ab;
  long double oab = getAngle(oa, ab, ob);
  long double oba = getAngle(ob, ab, oa);
  long double pathleng;
  if (dcmp(h, r) <= 0 && dcmp(oab, PI / 2) <= 0 && dcmp(oba, PI / 2) <= 0) {
    long double ac = sqrt(x * x + y * y - r * r);
    long double bd = sqrt(tx * tx + ty * ty - r * r);
    long double aob = getAngle(oa, ob, ab);
    long double aoc = getAngle(oa, r, ac);
    assert(dcmp(aoc, acos(r / oa)) == 0);
    long double bod = getAngle(ob, r, bd);
    assert(dcmp(bod, acos(r / ob)) == 0);
    long double cod = aob - aoc - bod;
    pathleng = ac + bd + cod * r;
  } else {
    pathleng = ab;
  }
  return dcmp(pathleng, t * v) <= 0;
}
inline double toRadian(double degree) { return degree / 180 * PI; }
inline double toDegree(double radian) { return radian / PI * 180; }
inline void run() {
  cin >> xp >> yp >> vp;
  cin >> x >> y >> v >> r;
  RP = sqrt(xp * xp + yp * yp);
  vAngle = vp / RP;
  initAngle = atan2(yp, xp);
  long double lowT = 0, hiT = 3 * 1e4 + 5;
  for (typeof(1000) step = 0; step < (1000); step++) {
    long double mid = (lowT + hiT) / 2;
    bool ret = isOk(mid);
    if (ret)
      hiT = mid;
    else
      lowT = mid;
  }
  cout << setprecision(12) << lowT << endl;
}