import kotlin.system.exitProcess
import java.util.*

fun main(args:Array<String>) {
    val (a, b) = readLine()!!.split(" ").map(String::toDouble)
    for (x in 1..1300) {
        if (Math.floor(x * 0.08) == a && Math.floor(x * 0.1) == b) {
            println(x)
            exitProcess(0)
        }
    }
    println(-1)
}