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;
}