"use strict";

function main(input) {
    input = input.split(" ").map(s => +s);
    const ia = input[0],
          ib = input[1],
          limit = ib * 100;

    for (let i = ib * 10; i < limit; i++) {
        if (~~(i * 0.08) === ia && ~~(i * 0.1) === ib) {
            return console.log(i);
        }
    }
    console.log(-1);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));