object Main extends App {
	val Array(a, b) = scala.io.StdIn.readLine.split(" ").map(_.toInt)
	var ans = -1
  
	for(x<-1009 to 1 by -1){
		if((x*0.08).toInt ==a  &&  (x*0.1).toInt == b){
			ans = x
		}
	}

	println(ans)
}