import java.util.Scanner

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

  val x1 = (a / 0.08).toInt
  val x2 = (b / 0.1).toInt

  val maxX = List(x1, x2).max
  val z =
    if (maxX == x1)
      if ((maxX * 0.1).toInt == b) maxX else -1
    else
      if ((maxX * 0.08).toInt == a) maxX else -1

  println(z)
}
