"use strict";
function main(input) {
  let kari = input[0].trim().split(" ");

  let a = parseInt(kari[0]);
  let b = parseInt(kari[1]);

  let tax = -1;

  for(let i=1; i < 10000 ; i++){
    if((Math.floor(i*0.08) === a) && (Math.floor(i*0.1) === b)){
      tax = i;
      break;
    }
  }

  console.log(tax);
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));