#include<cmath>
#include<cstdio>
#include<vector>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

const int V_MAX=100;

bool augment(int u,bool *vis,int match[2][V_MAX],const vector<int> *G){
	if(u==-1) return true;

	rep(i,G[u].size()){
		int v=G[u][i];
		if(!vis[v]){
			vis[v]=true;
			if(augment(match[1][v],vis,match,G)){
				match[0][u]=v;
				match[1][v]=u;
				return true;
			}
		}
	}
	return false;
}

int bipartite_matching(int L,int R,const vector<int> *G){
	static int match[2][V_MAX];
	rep(u,L) match[0][u]=-1;
	rep(v,R) match[1][v]=-1;

	int res=0;
	static bool vis[V_MAX];
	rep(u,L){
		rep(v,R) vis[v]=false;
		if(augment(u,vis,match,G)) res++;
	}
	return res;
}

int main(){
	for(int m,n;scanf("%d%d",&m,&n),m;){
		int sx[100],sy[100],v[100],gx[100],gy[100];
		rep(i,m) scanf("%d%d%d",sx+i,sy+i,v+i);
		rep(i,n) scanf("%d%d",gx+i,gy+i);

		static double d[100][100];
		rep(i,m) rep(j,n) d[i][j]=hypot(sx[i]-gx[j],sy[i]-gy[j]);

		double lo=0,hi=1e9;
		rep(_,70){
			double mi=(lo+hi)/2;

			vector<int> G[100];
			rep(i,m) rep(j,n) if(d[i][j]<v[i]*mi) G[i].push_back(j);

			if(bipartite_matching(m,n,G)==n) hi=mi; else lo=mi;
		}
		printf("%.9f\n",(lo+hi)/2);
	}

	return 0;
}