
const main = (input) => {
  const el = input.trim().split(" ").map(el => el * 1)
  let ans = - 1
  for (let i = 0; i < 100000; i++) {
  	if (Math.floor(0.08 * i)  === el[0] && Math.floor(0.1 * i) === el[1]) {
    	ans = i;
    }
    console.log(ans)
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf-8'))