n = gets.to_i
t = n * 2
i = 1
flag = false
while !flag && i <= t/2
  if t % i == 0
    flag = true if (t/i - i).abs == 1
  end
  i += 1
end

k = i
ans = Array.new(k){Array.new()}
v = 1
if flag
  k.times do |i|
    (i+1).upto(k-1) do |j|
      ans[i] << v
      ans[j] << v
      v += 1
    end
  end
  puts "Yes"
  ans.each do |a|
    puts "#{a.length} #{a.join(' ')}"
  end
else
  puts "No"
end
