def lscan; gets.split.map(&:to_i); end n, k = lscan k2 = k*2 if n/k2*k2 != n puts 'No' exit end puts 'Yes' i = 0 k.times do |i| (n/k2).times do |j| print (j*k2+i+1).to_s+' '+(j*k2+k2-i).to_s+' ' end puts end