fun main(args: Array<String>) {
    val (a, b) = readLine()!!.split(" ").map { it.toInt() }
    val iter = 1250
    var count = 0;
    for(i in 1..iter){
        var tax_a = Math.floor(i*0.08).toInt()
        var tax_b = Math.floor(i*0.1).toInt()
        if(tax_a == a && tax_b == b){
            println(i)
            count++
            break
        }
    }
    if(count == 0) println(-1)
}