N, K = gets.split.map(&:to_i) if N % K != 0 puts 'No' exit end S = N * (1 + N) / 2 cnt = N / K if S % cnt != 0 puts 'No' exit end if cnt % 2 != 0 puts 'No' exit end queue = [*1..N] puts 'Yes' K.times do values = [] (cnt / 2).times do values << queue.shift end (cnt / 2).times do values << queue.pop end puts values.join(' ') end