program test
implicit none
real::a,b,c
integer::i,k,l,ans
read*,a,b
c=0
ans=100000
do i=1,10000
	k=floor(i*0.08)
    l=floor(i*0.1)
	if(a==k .and. b==l)then 
    	ans=min(ans,i)
   end if
end do  
if(ans==100000)then
ans=-1
end if
print*,ans
end program test