N,K = gets.chomp.split(" ").map(&:to_i)
if K > (N-1)*N/2-(N-1)
    puts -1
else
    arr = []
    (2..N).each do |n|
        arr << [1, n]
    end
    num = (N-1)*N/2-(N-1)-K
    (1..num).each do |n|
        arr << [n, n+1]
    end
    arr.each do |n|
        puts n.join(" ")
    end
end