#include <bits/stdc++.h>

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

using namespace std;

typedef long double ld;
#define MAX_V 1000
int V;

vector<int> g[MAX_V];
int match[MAX_V];
bool used[MAX_V];

void add_edge(int u, int v) {
  g[u].push_back(v);
  g[v].push_back(u);
}

bool dfs(int v) {
  used[v] = true;
  REP(i, g[v].size()) {
    int u = g[v][i], w = match[u];
    if (w < 0 || (!used[w] && dfs(w))) {
      match[v] = u;
      match[u] = v;
      return true;
    }
  }
  return false;
}

int bipartite_matching(void) {
  int res = 0;
  memset(match, -1, sizeof(match));
  REP(v, V) {
    if (match[v] < 0) {
      memset(used, 0, sizeof(used));
      if (dfs(v)) res++;
    }
  }
  return res;
}

int main() {
  while(1){
    int n,m;
    cin>>n>>m;
    if(!n)break;
    V = n;
    vector<tuple<ld, ld, ld>> troop;
    REP(i,n){
      int x,y,v;
      cin>>x>>y>>v;
      troop.emplace_back(x,y,v);
    }
    vector<tuple<ld, ld>> base;
    REP(i,m){
      int x,y;
      cin>>x>>y;
      base.emplace_back(x,y);
    }
    ld lv = 0.0, rv = 20000.0;
    REP(i,50) {
      REP(j,MAX_V) g[j].clear();
      ld mid = (lv + rv) / 2.0;
      REP(j,n)REP(k,m) {
        ld tx,ty,tv,bx,by;
        tie(tx,ty,tv) = troop[j];
        tie(bx,by) = base[k];
        if ((tx-bx)*(tx-bx)+(ty-by)*(ty-by)<tv*tv*mid*mid) {
          add_edge(j,n+k);
        }
      }
      if (bipartite_matching() >= m) rv = mid;
      else lv = mid;
    }
    cout << setprecision(10) << fixed << lv << endl;
  }
  return 0;
}