program abc
	implicit none
	integer :: a,b,n,na,nb,x
    double precision :: an,bn

	read(*,*) a,b
	
    x = -1
    
    do n = 1, 1000
    	an = n * 0.08
        na = int(an)
        if(na /= a) goto 100
        bn = n * 0.1
        nb = int(bn)
        if(nb /= b) goto 100
        x = n
        goto 200
100		continue
	enddo

200	continue
 
	write(*,*) x
    
end program abc