import java.util.Scanner

fun main(args: Array<String>){
  val scn = Scanner(System.`in`) //Scannerのインスタンスを作成
  
  val a: Int = scn.nextInt()
  val b: Int = scn.nextInt()
  var result: Int = -1

  for(i in 10000 downTo 1) {
    val c = floor(i * 0.08)
    val d = floor(i * 0.10)
    if (a == c && b == d) result = i
  }
  println(result)
}

fun floor(num: Double) : Int {
  val a = num * 100
  val b = a % 100
  val c = (a - b) / 100
  return c.toInt()
}
