#include<cstdio>
#include<iostream>
#include<complex>
#include<vector>
#include<algorithm>
#include<cmath>
#include<map>
#include<list>

#define EPS (1e-10)
#define EQ(a,b) (abs((a)-(b)) < EPS)
#define fs first
#define sc second
#define pb push_back
#define sz size()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)

using namespace std;

typedef complex<double> P;
typedef pair<P,P> L;
typedef vector<P> Poly;
typedef pair<P,double> C;

const double PI = acos(-1);

//for vector
P unit(P p){return p / abs(p);}

pair<P,P> norm(P p){return make_pair(p*P(0,1),p*P(0,-1));}

double dot(P x,P y){return real(conj(x)*y);}

double cross(P x,P y){return imag(conj(x)*y);}

//rotate a point counter-clockwise on the origin
P rotate(P v,double s){
  return P(real(v)*cos(s) - imag(v)*sin(s), real(v)*sin(s) + imag(v)*cos(s) );
}


//return seta A
double arg(double a,double b,double c){return acos( (b*b+c*c-a*a)/(2*b*c) );}


//for circle
double area_cir(C c){return PI * c.sc * c.sc;}

bool in_cir(C c,P x){return (abs(x-c.fs) +EPS < c.sc);}
bool on_cir(C c,P x){return EQ(abs(x-c.fs),c.sc);}

//circle position relation
int cpr(C a,C b){
  double d = abs(a.fs-b.fs);
  if(a.sc+b.sc + EPS < d)return -1;      //no cross point (outside)
  if(b.sc+d + EPS < a.sc)return 1;       //no cross point (inside,B in A)
  if(a.sc+d + EPS < b.sc)return 2;       //no cross point (inside,A in B)
  //------------above verified----------------// 
  if(abs(a.sc+b.sc - d) < EPS)return -3; //one cross point (outside)
  if(abs(b.sc+d - a.sc) < EPS)return 3;  //one cross point (inside,B in A)
  if(abs(a.sc+d - b.sc) < EPS)return 4;  //one cross point (inside,A in B)
  return 0;                              //two cross point
}
  
//not verified
vector<P> cp_cir_to_cir(C a, C b){
  vector<P> v;
  int pos = cpr(a,b);
  if(pos==0){
    double s = arg(b.sc,abs(b.fs-a.fs),a.sc);
    P x = a.sc * unit(b.fs - a.fs);
    v.pb(a.fs + rotate(x,s));
    v.pb(a.fs + rotate(x,-s));
  }else if(abs(pos) == 3){
    v.pb(a.fs + a.sc * unit(b.fs-a.fs));
  }else if(pos == 4){
    v.pb(a.fs + a.sc * unit(b.fs-a.fs));
  }
  return v;
}

int n;
int x,y,v[110];
P p[110];
C c[110];

bool check(double t){
  for(int i=0;i<n;i++)c[i] = C(p[i],v[i]*t);
  vector<P> s,cp;
  int pos;

  for(int i=0;i<n;i++)s.pb(p[i]);

  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      cp = cp_cir_to_cir(c[i],c[j]);
      for(int x=0;x<cp.sz;x++)s.pb(cp[x]);
    }
  }

  for(int i=0;i<s.sz;i++){
    bool f = true;
    for(int j=0;j<n;j++){
      if(abs(s[i]-c[j].fs) < c[j].sc + EPS)continue;
      f = false;
      break;
    }
    if(f)return true;
  }
  return false;
}

int main(){
  while(scanf("%d",&n)!=EOF,n){
    for(int i=0;i<n;i++){
      scanf("%d%d%d",&x,&y,&v[i]);
      p[i].real() = x; p[i].imag() = y;
    }

    double l = 0.0, r = 0.0;

    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
	//cout << p[i].real() << " " << p[i].imag() << endl;
	//cout << p[j].real() << " " << p[j].imag() << endl;
	r = max(r,abs(p[i]-p[j])/min(v[i],v[j]));
      }
    }
    //printf("%lf",r);

    for(int i=0;i<100;i++){
      double mid = (l+r)/2;
      if(check(mid))r = mid;
      else l = mid;
    }

    printf("%.8lf\n",r);
  }
}

Measured memory_bytes: 1376