#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)

#define INF INT_MAX/2
struct Maxflow {
	struct edge { int to, cap, rev; edge(int t, int c, int r) { to = t; cap = c; rev = r; } };
	int V;
	vector<vector<edge>> G;
	vector<int> itr, level;

	Maxflow(int V) : V(V) { G.assign(V, vector<edge>()); }

	void add_edge(int from, int to, int cap) {
		G[from].push_back(edge(to, cap, (int)G[to].size()));
		G[to].push_back(edge(from, 0, (int)G[from].size() - 1));
	}

	void bfs(int s) {
		level.assign(V, -1);
		queue<int> q;
		level[s] = 0; q.push(s);
		while (!q.empty()) {
			int v = q.front(); q.pop();
			for (auto &e : G[v]) {
				if (e.cap > 0 and level[e.to] < 0) {
					level[e.to] = level[v] + 1;
					q.push(e.to);
				}
			}
		}
	}

	int dfs(int v, int t, int f) {
		if (v == t) return f;
		for (int& i = itr[v]; i < (int)G[v].size(); ++i) {
			edge& e = G[v][i];
			if (e.cap > 0 and level[v] < level[e.to]) {
				int d = dfs(e.to, t, min(f, e.cap));
				if (d > 0) {
					e.cap -= d;
					G[e.to][e.rev].cap += d;
					return d;
				}
			}
		}
		return 0;
	}

	int run(int s, int t) {
		int ret = 0, f;
		while (bfs(s), level[t] >= 0) {
			itr.assign(V, 0);
			while ((f = dfs(s, t, INF)) > 0) ret += f;
		}
		return ret;
	}
};

typedef complex<double> P;
const double EPS = 1e-10;






int N, M;
P TP[100];
double TV[100];
P BP[100];

bool check(double t)
{
	Maxflow mf(1 + N + M + 1);
	rep(i, 0, N) mf.add_edge(0, i + 1, 1);
	rep(i, 0, N) rep(j, 0, M)
	{
		P vec = TP[i] - BP[j];
		double tt = abs(vec) / TV[i];
		if (tt <= t + EPS) mf.add_edge(i + 1, 1 + N + j, 1);
	}
	rep(i, 0, M) mf.add_edge(1 + N + i, 1 + N + M, 1);

	if (mf.run(0, 1 + N + M) == M)
		return true;
	else
		return false;
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	while (cin >> N >> M)
	{
		if (N == 0) return 0;

		rep(i, 0, N)
		{
			double x, y; cin >> x >> y >> TV[i];
			TP[i] = P(x, y);
		}
		rep(i, 0, M)
		{
			double x, y; cin >> x >> y;
			BP[i] = P(x, y);
		}

		double l = 0, r = 1e12;
		rep(i, 0, 100)
		{
			double m = (l + r) / 2.0;
			if (check(m))
				r = m;
			else
				l = m;
		}
		printf("%.10f\n", r);
	}
}