import java.util.Scanner;

fun main (args : Array<String>) {
  val input = Scanner(System.`in`)
  
  while (input.hasNext()) {
    val A = input.nextInt()
    val B = input.nextInt()
    var price = -1
    
    for (p in 1..1000) {
      val price8 = (p * 2) / 25
      val price10 = p / 10
      
      if (price8 == A && price10 == B) {
        price = p
        break
      }
    }
    
    println(price)
  }
}