import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val a = sc.nextInt()
  val b = sc.nextInt()

  val x = 1 to 1000
  val y = x.find(i => (i * 0.08).toInt == a && (i * 0.1).toInt == b)

  println(y.getOrElse(-1))
}
