import scala.annotation.tailrec
import scala.collection.{immutable, mutable}
import scala.io.StdIn._
object Main extends App {
  loop()
  @tailrec def loop(): Unit = {
    val Array(n, m) = readLine.trim.split(' ').map(_.toInt)
    if (n == 0 && m == 0) return
    val troops = Array.fill(n) {
      val Array(x, y, v) = readLine.trim.split(' ').map(_.toInt)
      new Troop(x, y, v)
    }
    val bases = Array.fill(m) {
      val Array(x, y) = readLine.trim.split(' ').map(_.toInt)
      Coordinate(x, y)
    }
    def makeGraph(): Array[List[Edge]] = {
      val nodes = Array.fill(n + m + 2) {
        Nil: List[Edge]
      }
      val source = n + m
      val sink = source + 1
      for (i ← 0 until n) {
        for (j ← 0 until m) {
          val forward = Edge(j + n, troops(i).reachTime(bases(j)), true)
          val backward = Edge(i, troops(i).reachTime(bases(j)), false)
          forward.pair = backward
          backward.pair = forward
          nodes(i) ::= forward
          nodes(j + n) ::= backward
        }
        val forward = Edge(i, 0, true)
        val backward = Edge(source, 0, false)
        forward.pair = backward
        backward.pair = forward
        nodes(source) ::= forward
        nodes(i) ::= backward
      }
      for (j ← 0 until m) {
        val forward = Edge(sink, 0, true)
        val backward = Edge(n + j, 0, false)
        forward.pair = backward
        backward.pair = forward
        nodes(n + j) ::= forward
        nodes(sink) ::= backward
      }
      nodes
    }

    val nodes = makeGraph()
    val searching = Array.fill(n + m + 2) {
      Nil: List[Edge]
    }
    val depth = Array.fill(n + m + 2) {
      -1
    }
    var min = 0d
    var max = 20000d
    while (max - min > 0.000000001) {
      val mid = (max + min) / 2
      if (calMaxMatching(mid) == m) {
        max = mid
      } else {
        min = mid
      }
    }
    println(f"$max%.10f")
    def resetEdge(timeLimit: Double): Unit = {
      val source = n + m
      val sink = source + 1
      for (i ← 0 until n; e ← nodes(i) if e.to != source) {
        e.flow = e.time <= timeLimit
        e.pair.flow = false
      }
      for (e ← nodes(source)) {
        e.flow = true
        e.pair.flow = false
      }
      for (e ← nodes(sink)) {
        e.flow = false
        e.pair.flow = true
      }
    }

    def bfs(source: Int): Unit = {
      depth.indices.foreach(i ⇒ depth(i) = -1)
      val queue = mutable.Queue[Int](source)
      depth(source) = 0
      while (queue.nonEmpty) {
        val current = queue.dequeue()
        for (Edge(next, _, flow) ← nodes(current) if flow && depth(next) == -1) {
          depth(next) = depth(current) + 1
          queue.enqueue(next)
        }
      }
    }

    def dfs(current: Int, sink: Int): Boolean = {
      if (current == sink) true
      else {
        var hasFlow = false
        while (searching(current).nonEmpty && !hasFlow) {
          if (searching(current).head.flow && depth(current) < depth(searching(current).head.to)) {
            hasFlow = dfs(searching(current).head.to, sink)
          }
          if (hasFlow) {
            searching(current).head.flow = false
            searching(current).head.pair.flow = true
          } else searching(current) = searching(current).tail
        }
        hasFlow
      }
    }

    def calMaxMatching(timeLimit: Double): Int = {
      resetEdge(timeLimit)
      val source = n + m
      val sink = n + m + 1
      var flow = 0
      var hasFlow = true
      while (hasFlow) {
        hasFlow = false
        searching.indices.foreach(i ⇒ searching(i) = nodes(i))
        bfs(source)
        while (dfs(source, sink)) {
          hasFlow = true
          flow += 1
        }
      }
      flow
    }

    loop()
  }
}
case class Troop(position: Coordinate, speed: Int) {
  def this(x: Int, y: Int, speed: Int) { this(Coordinate(x, y), speed) }
  def reachTime(base: Coordinate): Double = position.distance(base) / speed
}
case class Coordinate(x: Int, y: Int) {
  def distance(that: Coordinate): Double = math.sqrt((x - that.x) * (x - that.x) + (y - that.y) * (y - that.y))
}
case class Edge(to: Int, time: Double, var flow: Boolean) {
  private var mPair: Option[Edge] = None
  def pair_=(that: Edge): Unit = mPair = Some(that)
  def pair: Edge = mPair.get
}
