Problem: A country Gizevom is being under a sneak and fierce attack by their foe. They have to deploy one or more troops to every base immediately in order to defend their country. Otherwise their foe would take all the bases and declare "All your base are belong to us."

You are asked to write a program that calculates the minimum time required for deployment, given the present positions and marching speeds of troops and the positions of the bases.



Input

The input consists of multiple datasets. Each dataset has the following format:

N M
x1 y1 v1
x2 y2 v2
...
xN yN vN
x'1 y'1
x'2 y'2
...
x'M y'M


N is the number of troops (1 ≤ N ≤ 100); M is the number of bases (1 ≤ M ≤ 100); (xi, yi ) denotes the present position of i-th troop; vi is the speed of the i-th troop (1 ≤ vi ≤ 100); (x'j, y'j) is the position of the j-th base.

All the coordinates are integers between 0 and 10000 inclusive.

The last dataset is followed by a line containing two zeros. This line is not a part of any dataset and should not be processed.

Output

For each dataset, print the minimum required time in a line.

Example

Input

2 2
10 20 1
0 10 1
0 10
10 0
0 0


Output

14.14213562

Solution (in CPP):

Solution:
#include<iostream>
#include<queue>
#include<vector>
#include<set>
#include<cmath>
#include<algorithm>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)

const double eps = 1e-7;

#define MAX 250
#define INF (1<<21)
double edge[MAX][MAX];
int cap[MAX][MAX];
int tcap[MAX][MAX];
bool visited[MAX];
int parent[MAX];
int flow[MAX][MAX];
int layer[MAX];


void make_layer(int n,int s,int t){
  queue<int> Q;
  Q.push(s);
  layer[s]=0;
  while(!Q.empty()){
    int now = Q.front();
    Q.pop();
    rep(i,n){
      if ( cap[now][i]-flow[now][i] >0 && layer[i] ==-1){
	layer[i]=layer[now]+1;
	Q.push(i);
      }
    }
  }
}

int augment(int now,int t,int n,int f){
  if (now == t || f == 0)return f;
  if ( visited[now] == true)return 0;
  rep(i,n){
    if (layer[now]<layer[i]){
      int tmp= augment(i,t,n,min(f,cap[now][i]-flow[now][i]));
      if( tmp>0){
	flow[now][i]+=tmp;
	flow[i][now]=-flow[now][i];
	visited[now]=false;
	return tmp;
      }
    }
  }
  return 0;
}


int dinic(int n,int s,int t,double time){
  int ansflow=0;
  bool flag=true;
  rep(i,n){
    rep(j,n){
      if( edge[i][j]<eps+time)cap[i][j]=tcap[i][j],flow[i][j]=0;
      else cap[i][j]=0,flow[i][j]=0;
    }
  }



  while(flag){
    fill(layer,layer+n,-1);
    fill(visited,visited+n,false);
    make_layer(n,s,t);
    if ( layer[t] == -1)break;
   
    for(int f=1;f;flag=true){
      f=augment(s,t,n,INF);
      if ( f == 0)break;
      ansflow+=f;
    }
  }
  return ansflow;
}


#define SUPERSOURCE 0
#define SUPERSINK   1

double solve(int n,vector<double> &v,int m){
 int l=0,r=v.size()-1,ret=-1;
  while(l<=r){
    int mid = (r+l)/2;
    if ( dinic(n,SUPERSOURCE,SUPERSINK,v[mid])==m )r=mid-1,ret=mid;
    else l=mid+1;
  }
  return v[ret];
}

class Double{
public:
  double b;
  bool operator<(const Double & a)const{
    if ( abs(b-a.b)<eps)return false;
    else return b < a.b;
  }
};

inline double calc_dist(double x,double y,double v){
  return sqrt(x*x+y*y)/v;
}




int main(){
  int n,m;
   while(cin>>n>>m && n){
    double xt[n],yt[n],v[n],xbase[n],ybase[n];
    rep(i,n)cin>>xt[i]>>yt[i]>>v[i];
    rep(i,m)cin>>xbase[i]>>ybase[i];
    int node = 2+n+m;
    rep(i,node)rep(j,node)edge[i][j]=INF,tcap[i][j]=0;
    set<Double> S;
    vector<double> in;
    rep(i,n){
      rep(j,m){
	int src=2+i,dst=2+n+j;
	edge[src][dst]=calc_dist(xt[i]-xbase[j],yt[i]-ybase[j],v[i]);
	tcap[src][dst]=1;
	Double tmp={edge[src][dst]};
	if ( S.find(tmp)==S.end())in.push_back(tmp.b),S.insert(tmp);
      }
    }
    rep(i,n){
      tcap[SUPERSOURCE][2+i]=1;
      edge[SUPERSOURCE][2+i]=-1;
    }
    rep(j,n){
      tcap[2+n+j][SUPERSINK]=1;
      edge[2+n+j][SUPERSINK]=-1;
    }
    sort(in.begin(),in.end());
    printf("%.9lf\n",solve(node,in,m));
   }
   
}