import scala.io.StdIn._

object Main extends App {
  val nums = readLine.split(" ").map(_.toLong)
  val eightTax = nums(0)
  val tenTax = nums(1)

  val ans = Range.inclusive(0, 1300).find ( orig =>
    Math.floor(orig.toDouble * 0.08) == eightTax && Math.floor(orig.toDouble * 0.1) == tenTax
  )

  println(ans.getOrElse(-1))
}

