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 <cstdlib>
#include <cstring>
#include <climits>
#include <cassert>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <complex>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <iterator>

using namespace std;

#define dump(n) cout<<"# "<<#n<<'='<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define peri(i,a,b) for(int i=int(b);i-->int(a);)
#define rep(i,n) repi(i,0,n)
#define per(i,n) peri(i,0,n)
#define iter(c) __typeof__((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();++i)
#define all(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<string> vs;
typedef pair<int,int> pii;

const int INFTY=1<<29;
const double EPS=1e-9;

template<typename T1,typename T2>
ostream& operator<<(ostream& os,const pair<T1,T2>& p){
	return os<<'('<<p.first<<','<<p.second<<')';
}
template<typename T>
ostream& operator<<(ostream& os,const vector<T>& a){
	os<<'[';
	rep(i,a.size()) os<<(i?" ":"")<<a[i];
	return os<<']';
}

struct Edge{
	int src,dst;
	Edge(){}
	Edge(int s,int d):src(s),dst(d){}
};
typedef vector<vector<Edge> > Graph;

bool BFS(const Graph& g,const vi& side,const vi& match,vi& level)
{
	int n=g.size();
	level.assign(n,n);
	queue<pii> q;
	rep(i,n) if(side[i]==0 && match[i]==-1)
		q.push(mp(i,0));
	bool res=false;
	while(!q.empty()){
		pii cur=q.front(); q.pop();
		int u=cur.first,l=cur.second;
		if(level[u]<=l) continue;
		level[u]=l;
		rep(i,g[u].size()){
			int v=g[u][i].dst;
			if(match[v]==-1)
				res=true;
			else
				q.push(mp(match[v],l+2));
		}
	}
	return res;
}

bool DFS(const Graph& g,const vi& side,int u,vi& match,vi& level)
{
	rep(i,g[u].size()){
		int v=g[u][i].dst;
		if(match[v]==-1 || level[match[v]]>level[u] && DFS(g,side,match[v],match,level)){
			match[u]=v;
			match[v]=u;
			return true;
		}
	}
	level[u]=-1;
	return false;
}

int HopcroftKarp(const Graph& g,const vi& side,vi& match)
{
	int n=g.size();
	match.assign(n,-1);
	int res=0;
	for(vi level;BFS(g,side,match,level);)
		rep(i,n) if(side[i]==0 && match[i]==-1)
			res+=DFS(g,side,i,match,level);
	return res;
}

typedef complex<double> Point;

int main()
{
	for(int n,m;scanf("%d%d",&n,&m),n|m;){
		vector<Point> ts(n),bs(m);
		vi vs(n);
		rep(i,n){
			int x,y; scanf("%d%d%d",&x,&y,&vs[i]);
			ts[i]=Point(x,y);
		}
		rep(i,m){
			int x,y; scanf("%d%d",&x,&y);
			bs[i]=Point(x,y);
		}
		
		vvd t(n,vd(m));
		rep(i,n) rep(j,m)
			t[i][j]=abs(bs[j]-ts[i])/vs[i];
		
		double lo=0,hi=20000;
		rep(_,50){
			double mi=(lo+hi)/2;
			Graph g(n+m);
			rep(i,n) rep(j,m) if(t[i][j]<mi){
				g[i].emplace_back(i,n+j);
				g[n+j].emplace_back(n+j,i);
			}
			vi side(n+m),match;
			fill(n+all(side),1);
			if(HopcroftKarp(g,side,match)==m)
				hi=mi;
			else
				lo=mi;
		}
		printf("%.8f\n",lo);
	}
	
	return 0;
}