#include <bits/stdc++.h>
using namespace std;

#define dump(...) cout<<"# "<<#__VA_ARGS__<<'='<<(__VA_ARGS__)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define peri(i,a,b) for(int i=int(b);i-->int(a);)
#define rep(i,n) repi(i,0,n)
#define per(i,n) peri(i,0,n)
#define all(c) begin(c),end(c)
#define mp make_pair
#define mt make_tuple

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<string> vs;

template<typename T1,typename T2>
ostream& operator<<(ostream& os,const pair<T1,T2>& p){
	return os<<'('<<p.first<<','<<p.second<<')';
}

template<typename Tuple>
void print_tuple(ostream&,const Tuple&){}
template<typename Car,typename... Cdr,typename Tuple>
void print_tuple(ostream& os,const Tuple& t){
	print_tuple<Cdr...>(os,t);
	os<<(sizeof...(Cdr)?",":"")<<get<sizeof...(Cdr)>(t);
}
template<typename... Args>
ostream& operator<<(ostream& os,const tuple<Args...>& t){
	print_tuple<Args...>(os<<'(',t);
	return os<<')';
}

template<typename Ch,typename Tr,typename C>
basic_ostream<Ch,Tr>& operator<<(basic_ostream<Ch,Tr>& os,const C& c){
	os<<'[';
	for(auto i=begin(c);i!=end(c);++i)
		os<<(i==begin(c)?"":" ")<<*i;
	return os<<']';
}

constexpr int INF=1e9;
constexpr int MOD=1e9+7;
constexpr double EPS=1e-9;

struct Point{
	double x,y;
	Point(){}
	Point(double x,double y):x(x),y(y){}
	Point& operator+=(Point p){x+=p.x,y+=p.y; return *this;}
	Point& operator-=(Point p){x-=p.x,y-=p.y; return *this;}
	Point& operator*=(double c){x*=c,y*=c; return *this;}
	Point& operator/=(double c){x/=c,y/=c; return *this;}
};
Point operator+(Point a,Point b){return a+=b;}
Point operator-(Point a,Point b){return a-=b;}
Point operator*(Point a,double c){return a*=c;}
Point operator*(double c,Point a){return a*=c;}
Point operator/(Point a,double c){return a/=c;}
bool operator==(Point a,Point b){return abs(a.x-b.x)<EPS && abs(a.y-b.y)<EPS;}
bool operator!=(Point a,Point b){return !(a==b);}

struct Circle{
	Point center;
	double radius;
	Circle(){}
	Circle(Point c,double r):center(c),radius(r){}
	Circle(double x,double y,double r):center(x,y),radius(r){}
};

double Abs(Point p){
	return sqrt(p.x*p.x+p.y*p.y);
}
Point Rot(Point p,double t){
	return Point(cos(t)*p.x-sin(t)*p.y,sin(t)*p.x+cos(t)*p.y);
}

pair<Point,Point> InterPointCC(Circle c1,Circle c2){
	const double PI=acos(-1);
	Point p1=c1.center,p2=c2.center;
	double r1=c1.radius,r2=c2.radius;
	double d=Abs(p1-p2);
	double a=(d*d+r1*r1-r2*r2)/(2*d);
	double s=sqrt(r1*r1-a*a);
	return mp(p1+a/d*(p2-p1)+s*Rot((p2-p1)/d,PI/2),
			  p1+a/d*(p2-p1)-s*Rot((p2-p1)/d,PI/2));
}

ostream& operator<<(ostream& os,const Point& p){
	return os<<'('<<p.x<<','<<p.y<<')';
}
ostream& operator<<(ostream& os,const Circle& c){
	return os<<'('<<c.center.x<<','<<c.center.y<<','<<c.radius<<')';
}

int main()
{
	for(int n;cin>>n && n;){
		vector<Point> ps(n);
		vd vs(n);
		rep(i,n) cin>>ps[i].x>>ps[i].y>>vs[i];
		
		double lo=0,hi=100;
		rep(_,50){
			double t=(lo+hi)/2;
			vector<Circle> cs;
			rep(i,n) cs.emplace_back(ps[i],vs[i]*t);
			vector<Point> is;
			rep(i,n) is.push_back(cs[i].center);
			rep(i,n) repi(j,i+1,n){
				Circle c1=cs[i],c2=cs[j];
				if(c1.radius>c2.radius) swap(c1,c2);
				double d=Abs(c2.center-c1.center);
				
				if(c1.radius+c2.radius<d-EPS)
					continue;
				else if(c2.radius+c2.radius<d+EPS)
					is.push_back((c2.radius*c1.center+c1.radius*c2.center)/d);
				else if(d+c1.radius<c2.radius-EPS)
					continue;
				else if(d+c1.radius<c2.radius+EPS)
					is.push_back((c2.radius*c1.center-c1.radius*c2.center)/d);
				else{
					auto t=InterPointCC(c1,c2);
					is.push_back(get<0>(t));
					is.push_back(get<1>(t));
				}
			}
			bool ok=false;
			for(auto p:is){
				bool flg=true;
				for(auto c:cs)
					flg&=Abs(p-c.center)<c.radius+EPS;
				ok|=flg;
			}
			(ok?hi:lo)=t;
		}
		printf("%.9f\n",lo);
	}
}

Measured memory_bytes: 1320