program Ti
    implicit none
    integer A,B,i
    real :: eight = 0.08, ten = 0.1

    read *,A,B

    do i = 0, 10000
        if(int(i*eight) == A .and. int(i*ten) == B) then
            print '(i0)',int(i)
            stop
        endif
    enddo

    print '(i0)',-1

end program Ti