program example
	implicit none

	integer A,B,i,A1,B1
    
    read(*,*) A,B
    
    do i=1,1250
    
    	A1=int(i*0.08)
        
        B1=int(i*0.10)
        
        if (A==A1 .and. B==B1) then
        
        	write(*,*) i
            goto 1
        end if
        
    end do
    
    write(*,*) "-1"

1 end program example