n,m=gets.split.map(&:to_i) if n <= m puts 1 elsif n <= m * 2 puts 2 else puts -1 end