fun main(args: Array<String>) {
    val (a, b) = readLine()?.split(" ")?.map { it.toInt() } ?: return
    val x1 = Math.ceil(a / 0.08).toInt()
    val x1m = x1 + 12 - if ((a / 0.08).mod(1) > 0.0) {
        1
    } else {
        0
    }
    val x2 = Math.floor(b / 0.1).toInt()
    val x2m = x2 + 9

    if (x1 in x2..x2m) {
        println(x1)
    } else if (x1 <= x2 && x2m <= x1m) {
        println(x2)
    } else if (x2 in x1..x1m) {
        println(x2)
    } else {
        println(-1)
    }
}
