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;
long double pi = atan((long double)1) * 4;
class Point {
 public:
  long double x;
  long double y;
  Point(long double xi, long double yi) {
    x = xi;
    y = yi;
  };
  Point(){};
};
class Segment {
 public:
  Point p1;
  Point p2;
  Segment(Point p1i, Point p2i) {
    p1.x = p1i.x;
    p1.y = p1i.y;
    p2.x = p2i.x;
    p2.y = p2i.y;
  };
  long double length() {
    return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
  }
};
void pos_circle(Point p, long double v, long double t, Point* final_p) {
  long double R = sqrt((long double)(p.x * p.x + p.y * p.y));
  long double time_360 = 2 * pi * R / v;
  long double ini_angle = atan2((long double)p.y, (long double)p.x);
  long double final_angle = t * 2 * pi / time_360 + ini_angle;
  final_p->x = cos(final_angle) * R;
  final_p->y = sin(final_angle) * R;
}
long double distance_to_segment(Point p, Segment seg) {
  Segment a(seg.p1, p);
  Segment b(seg.p2, p);
  Segment* max;
  Segment* min;
  if (a.length() > b.length()) {
    max = &a;
    min = &b;
  } else {
    max = &b;
    min = &a;
  }
  if (seg.length() == 0 || min->length() == 0) return min->length();
  if ((min->length() * min->length() + seg.length() * seg.length() -
       max->length() * max->length()) /
          (2 * min->length() * seg.length()) <
      0)
    return min->length();
  long double s = (a.length() + b.length() + seg.length()) / 2;
  return 2 *
         sqrt(s * (s - a.length()) * (s - b.length()) * (s - seg.length())) /
         seg.length();
}
void tangent_points_to_circle(Point center, long double R, Point p, Point* p1,
                              Point* p2) {
  Segment s(center, p);
  if (s.length() <= R) {
    p1->x = p.x;
    p1->y = p.y;
    p2->x = p.x;
    p2->y = p.y;
  } else {
    long double ini_angle = atan2(p.y - center.y, p.x - center.x);
    long double final_angle1 = ini_angle + acos(R / s.length());
    long double final_angle2 = ini_angle - acos(R / s.length());
    p1->x = cos(final_angle1) * R + center.x;
    p1->y = sin(final_angle1) * R + center.y;
    p2->x = cos(final_angle2) * R + center.x;
    p2->y = sin(final_angle2) * R + center.y;
  }
}
long double angle_between(Point p1, Point p2) {
  long double result = atan2(p1.y, p1.x) - atan2(p2.y, p2.x);
  if (result > 2 * pi) result -= 2 * pi;
  if (result < -2 * pi) result += 2 * pi;
  if (result > pi) {
    result -= 2 * pi;
  }
  if (result < -pi) {
    result += 2 * pi;
  }
  return abs(result);
}
int main() {
  cout.precision(20);
  int xp, yp, vp, xs, ys, V, R;
  cin >> xp;
  cin >> yp;
  cin >> vp;
  cin >> xs;
  cin >> ys;
  cin >> V;
  cin >> R;
  Point ini_perse(xp, yp);
  Point perse(0, 0);
  Point center(0, 0);
  Point ship(xs, ys);
  long double time = 0.0000000000000000;
  long double time_ship = 0;
  long double range_min, range_max;
  if (ini_perse.x == ship.x && ini_perse.y == ship.y) {
    cout << time << endl;
    return 0;
  }
  time = 100;
  while (true) {
    pos_circle(ini_perse, vp, time, &perse);
    Segment s(perse, ship);
    long double distance = distance_to_segment(center, s);
    if (distance >= R)
      time_ship = s.length() / V;
    else {
      Point ship_tang1, ship_tang2, perse_tang1, perse_tang2;
      tangent_points_to_circle(center, R, ship, &ship_tang1, &ship_tang2);
      tangent_points_to_circle(center, R, perse, &perse_tang1, &perse_tang2);
      Segment route1_ship(ship, ship_tang1);
      Segment route2_ship(ship, ship_tang2);
      Segment route1_perse(perse_tang2, perse);
      Segment route2_perse(perse_tang1, perse);
      long double distance1 = route1_ship.length() +
                              angle_between(ship_tang1, perse_tang2) * R +
                              route1_perse.length();
      long double distance2 = route2_ship.length() +
                              angle_between(ship_tang2, perse_tang1) * R +
                              route2_perse.length();
      time_ship = min(distance1, distance2) / V;
    }
    if (time_ship < time)
      break;
    else
      time *= 2;
  }
  range_max = time;
  range_min = 0;
  while (true) {
    time = (range_max + range_min) / 2;
    pos_circle(ini_perse, vp, time, &perse);
    Segment s(perse, ship);
    long double distance = distance_to_segment(center, s);
    if (distance >= R)
      time_ship = s.length() / V;
    else {
      Point ship_tang1, ship_tang2, perse_tang1, perse_tang2;
      tangent_points_to_circle(center, R, ship, &ship_tang1, &ship_tang2);
      tangent_points_to_circle(center, R, perse, &perse_tang1, &perse_tang2);
      Segment route1_ship(ship, ship_tang1);
      Segment route2_ship(ship, ship_tang2);
      Segment route1_perse(perse_tang2, perse);
      Segment route2_perse(perse_tang1, perse);
      long double distance1 = route1_ship.length() +
                              angle_between(ship_tang1, perse_tang2) * R +
                              route1_perse.length();
      long double distance2 = route2_ship.length() +
                              angle_between(ship_tang2, perse_tang1) * R +
                              route2_perse.length();
      time_ship = min(distance1, distance2) / V;
    }
    if (abs(time - time_ship) < 0.0000000001) break;
    if (time_ship < time)
      range_max = time;
    else
      range_min = time;
  }
  cout << time << endl;
  return 0;
}