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 Point {
  double x, y;
  Point() {}
  Point(double a, double b) {
    x = a;
    y = b;
  }
  double mod2() { return x * x + y * y; }
  double mod() { return sqrt(x * x + y * y); }
  double arg() { return atan2(y, x); }
  Point ort() { return Point(-y, x); }
  Point unit() {
    double k = mod();
    return Point(x / k, y / k);
  }
};
Point operator+(const Point &a, const Point &b) {
  return Point(a.x + b.x, a.y + b.y);
}
Point operator-(const Point &a, const Point &b) {
  return Point(a.x - b.x, a.y - b.y);
}
Point operator/(const Point &a, double k) { return Point(a.x / k, a.y / k); }
Point operator*(const Point &a, double k) { return Point(a.x * k, a.y * k); }
bool operator==(const Point &a, const Point &b) {
  return abs(a.x - b.x) < 1e-9 && abs(a.y - b.y) < 1e-9;
}
bool operator!=(const Point &a, const Point &b) { return !(a == b); }
bool operator<(const Point &a, const Point &b) {
  if (abs(a.x - b.x) > 1e-9) return a.x < b.x;
  return a.y + 1e-9 < b.y;
}
void imp(Point p1) { cout << "(" << p1.x << "," << p1.y << ")" << endl; }
double distEntrePuntos(const Point &A, const Point &B) {
  return hypot(A.x - B.x, A.y - B.y);
}
double cross(const Point &A, const Point &B) { return A.x * B.y - A.y * B.x; }
double dot(const Point &A, const Point &B) { return A.x * B.x + A.y * B.y; }
double area(const Point &A, const Point &B, const Point &C) {
  return cross(B - A, C - A);
}
Point lineIntersection(const Point &A, const Point &B, const Point &C,
                       const Point &D) {
  return A + (B - A) * (cross(C - A, D - C) / cross(B - A, D - C));
}
double X1, Y1, velocidad1, radio1;
double angle(double dist, double radio) { return dist / radio; }
Point nuevo_punto(Point p, double rad) {
  return Point(p.x * cos(rad) - p.y * sin(rad),
               p.x * sin(rad) + p.y * cos(rad));
}
double x2, y2, radio2;
int velocidadMia;
bool intersectaSegmentoConCirculo(Point centro, double radio, Point A,
                                  Point B) {
  Point inter = lineIntersection(A, B, centro, centro + (B - A).ort());
  if (fabs((distEntrePuntos(inter, A) + distEntrePuntos(inter, B)) -
           distEntrePuntos(A, B)) < 1e-9) {
    if (1e-9 <= radio - distEntrePuntos(inter, centro)) return true;
  }
  return false;
}
double Angle1(Point centro, double radio, Point A) {
  return acos(radio / distEntrePuntos(centro, A));
}
double dist1(Point centro, double radio, Point A) {
  return sqrt((distEntrePuntos(A, centro) * distEntrePuntos(A, centro)) -
              (radio * radio));
}
double Angle2(Point A, Point B, Point Centro) {
  double angle =
      acos(dot(A - Centro, B - Centro) /
           (distEntrePuntos(A, Centro) * distEntrePuntos(B, Centro)));
  return angle;
}
bool funcion(double tiempo, int velocidad) {
  double dist = velocidad * tiempo;
  Point lugar = nuevo_punto(Point(X1, Y1), angle(dist, radio1));
  if (!intersectaSegmentoConCirculo(Point(0, 0), radio2, Point(x2, y2),
                                    lugar)) {
    if ((distEntrePuntos(lugar, Point(x2, y2)) / velocidadMia) <=
        tiempo - 1e-9) {
      return true;
    }
  } else {
    Point A = Point(x2, y2), B = lugar, Centro(0, 0);
    double Angle11 = Angle1(Centro, radio2, A),
           Angle22 = Angle1(Centro, radio2, B);
    double Angle_resto = Angle2(A, B, Centro);
    Angle_resto -= (Angle11 + Angle22);
    double todo = dist1(Centro, radio2, A) + dist1(Centro, radio2, B) +
                  Angle_resto * radio2;
    if ((todo / velocidadMia) <= tiempo - 1e-9) return true;
  }
  return false;
}
int main() {
  cin >> X1 >> Y1 >> velocidad1;
  radio1 = hypot(X1, Y1);
  cin >> x2 >> y2 >> velocidadMia >> radio2;
  if (X1 == x2 && Y1 == y2) {
    cout << "0.000000000000" << endl;
    return 0;
  }
  double L = 0, R = ((2.0 * acos(-1) * radio1) + 100.0) / velocidad1, mid;
  R = 100000000;
  while (fabs(R - L) > 1e-9) {
    mid = (L + R) / 2.0;
    if (funcion(mid, velocidad1)) {
      R = mid;
    } else {
      L = mid;
    }
  }
  if (funcion(L, velocidad1))
    printf("%.10lf\n", L);
  else if (funcion(R, velocidad1))
    printf("%.10lf\n", R);
  else
    cout << "al carajo" << endl;
  return 0;
}