#include<iostream>
#include<sstream>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>

#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf = (int)1e9;
const double INF = 1e12, EPS = 1e-9;

int n, m, dist[200][200], p[200];
int x[100], y[100], vv[100], xx[100], yy[100];
double d[100][100];
bool v[200];

bool rec(int s, int k){
	if(s < 0) return 1;
	rep(i, n + m) if(dist[s][i] >= 0 && dist[s][i] < k && !v[i]){
		v[i] = 1;
		if(rec(p[i], k)) return p[s] = i, p[i] = s, 1;
	}
	return 0;
}
bool ok(int k){
	rep(i, n + m) p[i] = -1;
	int res = 0;
	rep(i, n + m) if(p[i] < 0){
		rep(j, n + m) v[j] = 0;
		if(rec(i, k)) res++;
	}
	return res >= m;
}

int main(){
	while(cin >> n >> m, n){
		rep(i, n) cin >> x[i] >> y[i] >> vv[i];
		rep(i, m) cin >> xx[i] >> yy[i];
		
		vector<double> v;
		rep(i, n) rep(j, m){
			d[i][j] = hypot(x[i] - xx[j], y[i] - yy[j]) / vv[i];
			v.pb(d[i][j]);
		}
		sort(all(v));
		v.erase(unique(all(v)), v.end());
		memset(dist, -1, sizeof(dist));
		rep(i, n) rep(j, m) dist[i][j + n] = dist[j + n][i] = lower_bound(all(v), d[i][j] - EPS) - v.begin();
		
		int lo = 0, hi = v.size(), mid;
		while(lo + 1 < hi){
			mid = (lo + hi) / 2;
			if(ok(mid)) hi = mid;
			else lo = mid;
		}
		printf("%.9f\n", v[hi - 1]);
	}
	return 0;
}