#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-20;
const int Maxn = 10000;
inline long double read() {
  int x;
  scanf("%d", &x);
  return x;
}
struct Point {
  long double x, y, z;
  Point() {}
  Point(long double x0, long double y0, long double z0) {
    x = x0;
    y = y0;
    z = z0;
  }
  inline void read() {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    x = a;
    y = b;
    z = c;
  }
} poi[Maxn + 5];
double dis[Maxn + 5];
int n;
inline long double sqr(long double x) { return x * x; }
inline long double dist(Point a, Point b) {
  return sqrt(sqr(a.x - b.x) + sqr(a.y - b.y) + sqr(a.z - b.z));
}
long double vs, vh;
Point st, rec, ansRec;
inline long double check1(long double rate, int idx) {
  long double totDis = dist(poi[idx - 1], poi[idx]);
  long double left = 0, right = totDis + EPS, ans = totDis + 100;
  int totTime = 0;
  while (left + EPS < right && totTime <= 1000) {
    long double mid = (left + right) / 2.0;
    Point now =
        Point((poi[idx - 1].x * (totDis - mid) + poi[idx].x * mid) / totDis,
              (poi[idx - 1].y * (totDis - mid) + poi[idx].y * mid) / totDis,
              (poi[idx - 1].z * (totDis - mid) + poi[idx].z * mid) / totDis);
    long double tim1 = dist(now, st) / vh - rate, tim2 = mid / vs;
    if (tim1 < tim2 || fabs(tim1 - tim2) < EPS) {
      if (mid < ans) {
        ans = mid;
        rec = now;
      }
      left = mid + EPS;
    } else
      right = mid - EPS;
    totTime++;
  }
  if (ans > totDis) return -1;
  return ans / vs;
}
inline long double check2(long double rate, int idx) {
  long double totDis = dist(poi[idx - 1], poi[idx]);
  long double left = 0, right = totDis + EPS, ans = totDis + 100;
  int totTime = 0;
  while (left + EPS < right && totTime <= 1000) {
    long double mid = (left + right) / 2.0;
    Point now =
        Point((poi[idx - 1].x * (totDis - mid) + poi[idx].x * mid) / totDis,
              (poi[idx - 1].y * (totDis - mid) + poi[idx].y * mid) / totDis,
              (poi[idx - 1].z * (totDis - mid) + poi[idx].z * mid) / totDis);
    double tim1 = dist(now, st) / vh - rate, tim2 = mid / vs;
    if (tim1 < tim2 || fabs(tim1 - tim2) < EPS) {
      if (mid < ans) {
        ans = mid;
        rec = now;
      }
      right = mid - EPS;
    } else
      left = mid + EPS;
    totTime++;
  }
  if (ans > totDis) return -1;
  return ans / vs;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i <= n; i++) poi[i].read();
  vh = read();
  vs = read();
  st.read();
  long double rateTime = 0, ans = -10;
  for (int i = 1; i <= n; i++) {
    long double now;
    now = check1(rateTime, i);
    if (now > 0) {
      if (ans < 0 || ans > now + rateTime) {
        ans = now + rateTime;
        ansRec = rec;
      }
    }
    now = check2(rateTime, i);
    if (now > 0) {
      if (ans < 0 || ans > now + rateTime) {
        ans = now + rateTime;
        ansRec = rec;
      }
    }
    rateTime += dist(poi[i - 1], poi[i]) / vs;
  }
  if (ans > 0) {
    printf("YES\n%.8f\n", (double)ans);
    printf("%.8f %.8f %.8f\n", (double)ansRec.x, (double)ansRec.y,
           (double)ansRec.z);
  } else
    printf("NO\n");
  return 0;
}
