"use strict";

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

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