function Main(input){
	var A = parseInt(input.trim().split(" ")[0],10);
  	var B = parseInt(input.trim().split(" ")[1],10);
  	var min = 0;
 	var MAX = 100;
  	var res = [];
  	for(var i = 1;i<=MAX;i++){
      	var x1 = Math.floor(i*0.08);
      	var x2 = Math.floor(i*0.1);
    	if(x1 == A && x2 == B)res.push(i);
    }
  	if(res.length == 0){
    	console.log(-1);
    }else{
    	console.log(Math.min(...res));
    }
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));