object Main extends App {
  var input = readLine
  val A = input.split(" ")(0).toInt
  val B = input.split(" ")(1).toInt
  val C = 12.5 * A
  val D = 10 * B
  
  if ((C * 0.08).toInt == (D * 0.1).toInt) {
    if(C > D) {
      println(C.toInt)
    } else {
      println(D.toInt)
    }
  } else {
    println("-1")
  }
  
}