import java.io.PrintWriter
import java.util.StringTokenizer

fun main() {

    fun PrintWriter.solve() {
        var (a,b) = List(2){nextInt()}

        var xmin = 10*b
        var xmax = xmin + 9

        for (x in xmin..xmax){
            if ((0.08*x).toInt() == a){
                println(x)
                return
            }
        }

        println(-1)


    }

    writer.solve()
    writer.flush()


}


private val reader = System.`in`.bufferedReader()
private val writer = PrintWriter(System.out, false)

private var tokenizer: StringTokenizer = StringTokenizer("")

private fun next(): String {
    while (tokenizer.hasMoreTokens().not()) tokenizer = StringTokenizer(reader.readLine())
    return tokenizer.nextToken()
}

private fun nextInt() = next().toInt()
private fun nextLong() = next().toLong()
private fun nextDouble() = next().toDouble()
private fun nextLine() = reader.readLine()

