//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <queue>

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

void add_edge(VVI& graph, int u, int v){
  graph[u].push_back(v);
  graph[v].push_back(u);
}

bool dfs(VVI& biG, VI& match, int v, vector<bool>& used){
  used[v] = true;
  for(int i=0;i<biG[v].size();++i){
	int u = biG[v][i], w = match[u];
	if(w < 0 || (!used[w] && dfs(biG, match, w, used))){
	  match[v] = u;
	  match[u] = v;
	  return true;
	}
  }
  return false;
}

int bipartite_matching(VVI& biG, VI& match){
  int res = 0;
  int V = SZ(biG);
  fill(ALL(match), -1);
  for(int v=0;v<V;++v){
	if(match[v] < 0){
	  vector<bool> used(V, false);
	  if(dfs(biG, match, v, used))
		++res;
	}
  }
  return res;
}

int dist(PII& p1, PII& p2){
  int dx = p1.first - p2.first;
  int dy = p1.second - p2.second;
  return dx*dx+dy*dy;
}

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

  int N, M;
  while(cin>>N>>M,N){
	vector<PII> tr(N), base(M);
	VI vs(N);
	REP(i,N) cin >> tr[i].first >> tr[i].second >> vs[i];
	REP(i,M) cin >> base[i].first >> base[i].second;

	double lb = 0., ub = 1e9;
	REP(tt,100){
	  double mid = (lb + ub) / 2.;
	  VVI G(N+M);
	  REP(i,N) REP(j,M){
		if(sqrt(dist(tr[i], base[j])) <= mid*vs[i]){
		  add_edge(G, i, N+j);
		}
	  }
	  VI m(N+M);
	  if(bipartite_matching(G, m) == M)
		ub = mid;
	  else
		lb = mid;
	}
	cout << fixed << setprecision(9) << lb << endl;
  }
  
  return 0;
}