const input = require("fs").readFileSync("/dev/stdin", "utf8")
const lines = input.split('\n')
const [A, B] = lines[0].split(' ').map(Number)

const a = A / 0.08
const b = B / 0.1

let ans = null
if (a < b && Math.floor(b * 0.08) === A) {
    ans = b
} else if (a > b && Math.floor(a * 0.1) === B) {
    ans = a
} else if (a === b) {
    ans = a
} else {
    ans = -1
}
console.log(ans)