object c158 extends App {
  import scala.io.StdIn._
  val Array(a, b) = readLine().split(" ").map(_.toInt)
  var ans = 0
  var flag = true
  for(i <- (1 until 1010)){
    if(Math.floor(i.toDouble * 0.08) == a && Math.floor(i.toDouble * 0.1) == b && flag){
      ans = i
      flag = false
    }
  }
  println(if(flag) -1 else ans)
}