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 GCC optimize("O3")
using namespace std;
inline long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
inline long long add(long long _x, long long _y,
                     long long _mod = 1000000007LL) {
  _x += _y;
  return _x >= _mod ? _x - _mod : _x;
}
inline long long sub(long long _x, long long _y,
                     long long _mod = 1000000007LL) {
  _x -= _y;
  return _x < 0 ? _x + _mod : _x;
}
inline long long mul(long long _x, long long _y,
                     long long _mod = 1000000007LL) {
  _x *= _y;
  return _x >= _mod ? _x % _mod : _x;
}
long long mypow(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 1LL;
  long long _ret = mypow(mul(_a, _a, _mod), _x >> 1, _mod);
  if (_x & 1) _ret = mul(_ret, _a, _mod);
  return _ret;
}
long long mymul(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 0LL;
  long long _ret = mymul(add(_a, _a, _mod), _x >> 1, _mod);
  if (_x & 1) _ret = add(_ret, _a, _mod);
  return _ret;
}
inline bool equal(double _x, double _y) {
  return _x > _y - 1e-9 && _x < _y + 1e-9;
}
int __ = 1, _cs;
pair<double, double> operator+(const pair<double, double>& p1,
                               const pair<double, double>& p2) {
  return {p1.first + p2.first, p1.second + p2.second};
}
pair<double, double> operator-(const pair<double, double>& p1,
                               const pair<double, double>& p2) {
  return {p1.first - p2.first, p1.second - p2.second};
}
pair<double, double> operator*(const pair<double, double>& tp,
                               const double& tk) {
  return {tp.first * tk, tp.second * tk};
}
pair<double, double> operator/(const pair<double, double>& tp,
                               const double& tk) {
  return {tp.first / tk, tp.second / tk};
}
double operator*(const pair<double, double>& p1,
                 const pair<double, double>& p2) {
  return p1.first * p2.first + p1.second * p2.second;
}
double operator^(const pair<double, double>& p1,
                 const pair<double, double>& p2) {
  return p1.first * p2.second - p1.second * p2.first;
}
double norm2(const pair<double, double>& tp) { return tp * tp; }
double norm(const pair<double, double>& tp) { return sqrt(norm2(tp)); }
pair<double, double> perp(const pair<double, double>& tp) {
  return {tp.second, -tp.first};
}
void scan(pair<double, double>& tp) { scanf("%lf%lf", &tp.first, &tp.second); }
void print(pair<double, double>& tp, char cc = ' ') {
  printf("(%.6f, %.6f)%c", tp.first, tp.second, cc);
}
void build() {}
pair<double, double> he, my, ori;
double hev, myv, r;
double her, heang;
void init() {
  ori = {0, 0};
  scan(he);
  scanf("%lf", &hev);
  scan(my);
  scanf("%lf", &myv);
  scanf("%lf", &r);
  her = norm(he);
  heang = atan2(he.second, he.first);
}
double loop, perloop;
const double pi = acos(-1.0);
double mind(const pair<double, double>& p1, const pair<double, double>& p2,
            const pair<double, double>& p3) {
  double tmp = (p2 - p1) * (p3 - p1) / norm2(p3 - p1);
  if (-1e-9 < tmp and tmp < 1. + 1e-9)
    return fabs((p2 - p1) ^ (p3 - p1)) / norm(p3 - p1);
  return min(norm(p2 - p1), norm(p3 - p2));
}
double normal(double ang) {
  while (ang < 1e-9) ang += pi + pi;
  while (ang > pi + pi) ang -= pi + pi;
  return ang;
}
double cdist(double ang1, double ang2) {
  ang1 = normal(ang1);
  ang2 = normal(ang2);
  if (ang1 > ang2) swap(ang1, ang2);
  return min((ang2 - ang1) * r, (ang1 - ang2 + pi + pi) * r);
}
double dist(const pair<double, double>& tar) {
  if (mind(my, ori, tar) > r) return norm(my - tar);
  double ang1 = asin(r / norm(my));
  double ang2 = asin(r / norm(tar));
  double bs1 = atan2(my.second, my.first);
  double bs2 = atan2(tar.second, tar.first);
  double bst = 1e9;
  for (int bns = -1; bns <= 1; bns += 2)
    for (int bns2 = -1; bns2 <= 1; bns2 += 2) {
      bst = min(bst, fabs(cos(ang1) * norm(my)) + fabs(cos(ang2) * norm(tar)) +
                         cdist(bs1 + bns * (pi / 2 - ang1),
                               bs2 + bns2 * (pi / 2 - ang2)));
    }
  return bst;
}
double okay(double tt) {
  double ang = tt * 2 * pi / perloop;
  double cur = heang + ang;
  pair<double, double> at = {cos(cur) * her, sin(cur) * her};
  double d = dist(at);
  return d / myv < tt;
}
void solve() {
  loop = 2 * pi * her;
  perloop = loop / hev;
  double bl = 0, br = 1e9;
  for (int i = 0; i < 60; i++) {
    double bmid = (bl + br) * 0.5;
    if (okay(bmid))
      br = bmid;
    else
      bl = bmid;
  }
  printf("%.12f\n", (bl + br) * 0.5);
}
int main() {
  build();
  while (__--) {
    init();
    solve();
  }
}