"use strict"
function main(arg) {
    var data = arg.trim().split("\n")[0].split(" ").map(Number)
    var A = data[0]
    var B = data[1]
    var a = A / 0.08
    var b = B / 0.10
    var c = Math.floor((a + b) / 2)
    var start = (c  - 10) > 0 ? c - 10 : 0 
    var end = c  + 10
    // console.log(c)
    for (var i = start; i < end; i++) {
        var _a = Math.floor(i * 0.08)
        var _b = Math.floor(i * 0.1)
        // console.log([i,_a,_b])
        if (_a === A && _b === B) {
            console.log(i)
            return
        }
    }
    console.log(-1)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
