import java.util.*

fun main(args: Array<String>) {
  val (a, b) = readLine()!!.split(' ').map(String::toInt)
  for (n in 1..1000) {
    val x = Math.floor(n * 0.08).toInt()
    if (x != a) continue
    val y = Math.floor(n * 0.10).toInt()
    if (y != b) continue
    println(n)
    return
  }
  println(-1)
}
