#include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
using namespace std;

#define MP make_pair
#define PB push_back
typedef double DD;
const DD EPS = 1e-10;
const DD PI = acos(-1.0);
DD torad(int deg) {return (DD)(deg) * PI / 180;}
DD todeg(DD ang) {return ang * 180 / PI;}

struct Point {
    DD x, y;
    Point(DD x = 0.0, DD y = 0.0) : x(x), y(y) {}
    friend ostream& operator << (ostream &s, const Point &p) {return s << '(' << p.x << ", " << p.y << ')';}
};

Point operator + (const Point &p, const Point &q) {return Point(p.x + q.x, p.y + q.y);}
Point operator - (const Point &p, const Point &q) {return Point(p.x - q.x, p.y - q.y);}
Point operator * (const Point &p, const Point &q) {return Point(p.x * q.x - p.y * q.y, p.x * q.y + p.y * q.x);}
Point operator / (const Point &p, DD a) {return Point(p.x / a, p.y / a);}
DD dot(const Point &p, const Point &q) {return p.x * q.x + p.y * q.y;}
DD abs(const Point &p) {return sqrt(dot(p, p));}
bool eq(const Point &p, const Point &q) {return abs(p - q) < EPS;}

struct Circle : Point {
    DD r;
    Circle(Point p = Point(0.0, 0.0), DD r = 0.0) : Point(p), r(r) {}
};

vector<Point> crosspoint(Circle e, Circle f) {
    vector<Point> res;
    DD d = abs(e - f);
    if (d < EPS) return vector<Point>();
    if (d > e.r + f.r + EPS) return vector<Point>();
    if (d < abs(e.r - f.r) - EPS) return vector<Point>();
    DD rcos = (d * d + e.r * e.r - f.r * f.r) / (2.0 * d), rsin;
    if (e.r - abs(rcos) < EPS) rsin = 0;
    else rsin = sqrt(e.r * e.r - rcos * rcos);
    Point dir = (f - e) / d;
    Point p1 = e + dir * Point(rcos, rsin);
    Point p2 = e + dir * Point(rcos, -rsin);
    res.push_back(p1);
    if (!eq(p1, p2)) res.push_back(p2);
    return res;
}

int N;
Point p[110];
DD v[110];

int main() {
    while (cin >> N) {
        if (N == 0) break;
        for (int i = 0; i < N; ++i) cin >> p[i].x >> p[i].y >> v[i];
        DD lo = 0, hi = 200;
        for (int id = 0; id < 25; ++id) {
            DD med = (lo + hi) / 2;
            vector<Circle> cir(N);
            for (int i = 0; i < N; ++i) cir[i] = Circle(p[i], med*v[i]);
            for (int i = 0; i < cir.size(); ++i) for (int j = 0; j < cir.size(); ++j) {
                if (i == j) continue;
                if (abs(cir[i]-cir[j]) < cir[i].r - cir[j].r - EPS) {
                    cir.erase(cir.begin()+i--);
                    break;
                }
            }
                
            vector<Point> vec;
            if (cir.size() == 1) vec.PB(cir[0]);
            for (int j = 0; j < cir.size(); ++j) for (int k = j+1; k < cir.size(); ++k) {
                vector<Point> vp = crosspoint(cir[j], cir[k]);
                for (int l = 0; l < vp.size(); ++l) vec.PB(vp[l]);
            }
            
            bool ok = false;
            for (int j = 0; j < vec.size(); ++j) {
                int con = 0;
                for (int k = 0; k < cir.size(); ++k) {
                    if ( abs(vec[j] - cir[k]) <= cir[k].r + EPS ) ++con;
                }
                if (con == cir.size()) ok = true;
            }
            if (ok) hi = med;
            else lo = med;
        }
        printf("%.8lf\n", hi);
    }
    return 0;
}


Measured memory_bytes: 1256