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 <cstdio>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <stack>

using namespace std;

const double EPS=(1e-10);
typedef long long ll;
typedef pair<int,int> pii;
typedef complex<double> P;
bool EQ(double a,double b){
  return abs((a)-(b))<EPS;
}
void fast_stream(){
  std::ios_base::sync_with_stdio(0);
}

const int MAX_V = 300;
const double INF=1000000000;
int n,m;
P troops[101];
P bases[101];
double vs[101];
// troopÂÃbaseÂÃÂÃÂÃÂÂ®ÂÂÂÃ
double times[101][101];
// ÂOÂÂÂtÂÃÂÂÂXÂgÂ\ÂÂ»
vector<int> G[MAX_V];
// Â}ÂbÂ`ÂÂÂOÂÃÂyÂA
int match[MAX_V];
// dfsÂÃÂÂ·ÂÃÂÃÂÂ²ÂÃÂÂ½ÂÂ©ÂÃÂÂ¤ÂÂ©ÂÃÂtÂÂÂO
bool used[MAX_V];

// uÂÃvÂÃ°ÂÂÂÃÂÃÂÃ°ÂOÂÂÂtÂÃÂÃÂÃ
void add_edge(int u,int v){
  G[u].push_back(v);
  G[v].push_back(u);
}

// ÂÂÂÃÂpÂXÂÃ°dfsÂÃÂTÂÂ·
bool dfs(int v){
  used[v] = true;
  for(int i = 0; i < G[v].size(); i++){
    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;
}

// ÂÃ±ÂÂÂOÂÂÂtÂÃÂÃÂÃ¥Â}ÂbÂ`ÂÂÂOÂÃ°ÂÂÂÃÂÃ©
int bipartite_matching(int V){
  int res = 0;
  memset(match,-1,sizeof(match));
  for(int v = 0; v < V; v++){
    if(match[v] < 0){
      memset(used,0,sizeof(used));
      if(dfs(v))res++;
    }
  }
  return res;
}

// ÂÂÂÃtÂÃÂÃ°ÂÂÂÃ°ÂÂÂÂ½ÂÂ¹ÂÃ©ÂÂ©
bool check(double t){
  for(int i=0;i<MAX_V;i++)G[i].clear();
  for(int i=0;i<n;i++){
    for(int j=0;j<m;j++){
      // ÂÂÂÃÂÃÂÃÂÃÂÂÂÂ¤ÂÃÂÃ§ÂÃÂAÂÂÂÃ
      if(EQ(t,times[i][j])||t>times[i][j])
	add_edge(i,n+j);
    }
  }
  return bipartite_matching(n+m)==m;
}

int main(){

  while(cin>>n>>m&&(n|m)){
    for(int i=0;i<n;i++){
      int x,y;
      cin>>x>>y>>vs[i];
      troops[i]=P(x,y);
    }
    for(int i=0;i<m;i++){
      int x,y;
      cin>>x>>y;
      bases[i]=P(x,y);
    }
    for(int i=0;i<n;i++){
      for(int j=0;j<m;j++){
	double d=abs(troops[i]-bases[j]);
	times[i][j]=d/vs[i];
      }
    }
    double ub=INF;
    double lb=0;
    int cnt=100;
    while(cnt--){
      double mid=(ub+lb)/2;
      if(check(mid))ub=mid;
      else lb=mid;
    }
    printf("%.10f\n",ub);
  }

  return 0;
}