import Foundation

func readInts() -> [Int] {
    readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let ab = [8,10]//readInts()
    let (a,b) = (ab[0],ab[1])
    var cost = a * 10
    
    for _ in 0...100 {
        print(cost, cost * 8 / 100, cost * 10 / 100)
        if cost * 8 / 100 == a && cost * 10 / 100 == b {
            print(cost)
            return
        }
        cost += 1
    }
    print(-1)
}
main()
