program main
integer a,b,as,al,bs,bl
read *,a,b

as = int(100./8.*dble(a))
al = nint(100./8.*dble(a))
bs = int(100./10.*dble(b))
bl = nint(100./10.*dble(a))

do i=as,al
	do j=bs,bl
    	if(i==j) then
        	print *,i
            stop
        end if
     end do
end do
print *,-1       

end