"use strict";
function main(input) {
  input = input.split(" ");
  const ia = +input[0], ib = +input[1];
  for (let i = ib * 10; i < 1000; i++) {
    if (~~(i * 0.08) === ia && ~~(i * 0.1) === ib) {
      return console.log(i);
    }
  }
  console.log(-1);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));