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 <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
using namespace std;
#define all(c) begin(c), end(c)
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)

#define y1 y09830985

int N, M;
int x1[110], y1[110];
int x2[110], y2[110], v[110];

using Weight = int;
using Capacity = int;
struct Edge {
    int src, dst; 
    Capacity cap;
    Edge(int s, int d, Capacity c) : src(s), dst(d), cap(c) {}
};
using Edges = vector<Edge>;
using Graph = vector<Edges>;
using Array = vector<Weight>;
using Matrix = vector<Array>;

struct Dinic {
    int n, s, t;
    vector<int> level, prog, que;
    vector<vector<Capacity>> cap, flow;
    vector<vector<int>> g;
    Capacity inf;
    Dinic(const Graph &graph)
        : n(graph.size()),
        cap(n, vector<Capacity>(n)), flow(n, vector<Capacity>(n)),
        g(n, vector<int>()), inf(numeric_limits<Capacity>::max() / 8) {
        for (int i = 0; i < n; i++) {
            for (auto &e : graph[i]) {
                int u = e.src, v = e.dst;
                Capacity c = e.cap;
                cap[u][v] += c; cap[v][u] += c; flow[v][u] += c;
                g[u].push_back(v); g[v].push_back(u);
            }
        }
    }
    inline Capacity residue(int u, int v) { return cap[u][v] - flow[u][v]; }
    Capacity solve(int s_, int t_) {
        this->t = t_, this->s = s_;
        que.resize(n + 1);
        Capacity res = 0;
        while (levelize()) { prog.assign(n, 0); res += augment(s, inf); }
        return res;
    }
    bool levelize() {
        int l = 0, r = 0;
        level.assign(n, -1); level[s] = 0; que[r++] = s;
        while (l != r) {
            int v = que[l++]; if (v == t) break;
            for (const int &d : g[v]) if (level[d] == -1 && residue(v, d) != 0) {
                level[d] = level[v] + 1; que[r++] = d;
            }
        }
        return level[t] != -1;
    }
    Capacity augment(int v, Capacity lim) {
        Capacity res = 0;
        if (v == t) return lim;
        for (int &i = prog[v]; i < (int)g[v].size(); i++) {
            const int &d = g[v][i];
            if (residue(v, d) == 0 || level[v] >= level[d]) continue;
            const Capacity aug = augment(d, min(lim, residue(v, d)));
            flow[v][d] += aug; flow[d][v] -= aug;
            res += aug; lim -= aug;
            if (lim == 0) break;
        }
        return res;
    }
};


bool ok(double lim) {
    Graph g(N + M + 2);
    rep(i, N)rep(j, M) {
        double dx = x1[i] - x2[j];
        double dy = y1[i] - y2[j];
        double t = sqrt(dx*dx + dy*dy) / v[i];
        if (t < lim) {
            g[i].emplace_back(i, j + N, 1);
        }
    }
    rep(i, N) g[N + M].emplace_back(N + M, i, 1);
    rep(i, M) g[i + N].emplace_back(i + N, N + M + 1, 1);
    return Dinic(g).solve(N + M, N + M + 1) == M;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    while (cin >> N >> M && N) {
        rep(i, N) cin >> x1[i] >> y1[i] >> v[i];
        rep(i, M) cin >> x2[i] >> y2[i];
        double lb = 0, ub = 1e9;
        rep(i, 70) {
            double mid = (lb + ub) / 2;
            if (ok(mid)) {
                ub = mid;
            } else {
                lb = mid;
            }
        }
        cout << fixed << setprecision(10) << ub << endl;
    }
}