program main
  implicit none
  integer :: A,B
  integer :: i,j
  logical :: found
  read(*,*) A,B
  j = 100./0.08+1
  found = .false.
  do i = 1, j
     if ( int(i*0.08) == A .and. int(i*0.1) == B )  then
        found = .true.
        exit
     end if
  end do
  if ( found ) then
     write(*,'(i0)') i
  else 
     write(*,'(i0)') -1
  end if
end program main
