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 <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <cassert>
using namespace std;

struct BipartiteMatching {
	int V;
	vector<vector<bool> > G;
	vector<int> match;
	vector<bool> used;

	BipartiteMatching(int v) {
		V = v;
		G = vector<vector<bool> >(v, vector<bool>(v));
		match = vector<int>(v);
		used = vector<bool>(v);
	}

	void add_edge(int v, int u) {
		G[v][u] = G[u][v] = true;
	}

	bool dfs(int v) {
		used[v] = true;
		for(int i = 0; i < V; i++) {
			if(!G[v][i]) continue;
			int u = i, w = match[u];
			if(w < 0 || (!used[w] && dfs(w))) {
				match[v] = u;
				match[u] = v;
				return true;
			}
		}
		return false;
	}

	int calc() {
		int res = 0;
		fill(match.begin(), match.end(), -1);
		for(int v = 0; v < V; v++) {
			if(match[v] < 0) {
				fill(used.begin(), used.end(), false);
				if(dfs(v)) {
					res++;
				}
			}
		}
		return res;
	}
};

double tx[100];
double ty[100];
double tv[100];
double bx[100];
double by[100];

double d(double x1, double y1, double x2, double y2) {
	x1 -= x2, y1 -= y2;
	return sqrt(x1 * x1 + y1 * y1);
}

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

	int N, M;
	while(cin >> N >> M, N | M) {
		for(int i = 0; i < N; i++) {
			cin >> tx[i] >> ty[i] >> tv[i];
		}
		for(int i = 0; i < M; i++) {
			cin >> bx[i] >> by[i];
		}
		BipartiteMatching bp(N + M);
		double ng = 0, ok = 1e8;
		for(int lopp = 0; lopp < 200; lopp++) {
			double m = (ng + ok) / 2;

			for(int i = 0; i < N; i++) {
				for(int j = 0; j < M; j++) {
					double dist = d(tx[i], ty[i], bx[j], by[j]);
					bp.G[i][N + j] = bp.G[N + j][i] = (dist / tv[i] <= m);
				}
			}

			if(bp.calc() == M) {
				ok = m;
			}
			else {
				ng = m;
			}
		}

		if(abs(ok) < 1e-8) {
			cout << 0 << endl;
		}
		else {
			cout << setprecision(20) << ok << endl;
		}
	}
}