import scala.util.control.Breaks._
object Main extends App {
  val Array(a, b) = io.StdIn.readLine().split(' ').map(_.toInt)
  var answer = -1
  breakable {
    for (n <- 1 to 1000) {
      val (ta, tb) = ((n * 0.08).toInt, (n * 0.1).toInt)
      if (ta == a && tb == b) {answer = n; break()}
      if (ta > a || tb > b) break()
    }
  }
  println(answer)
}