n = gets.chop.to_i

k = 1
flag = false
loop do
  k += 1
  num = k * (k-1) / 2
  if num == n
    flag = true
    break
  end
  break if num > n
end

if flag
  ans = Array.new(k, nil).map{Array.new(0)}
  (1..k).to_a.combination(2).to_a.each_with_index do |v, i|
    v.each do |j|
      ans[j-1] << i + 1
    end
  end
  puts 'Yes'
  puts k
  k.times do |i|
    puts "#{ans[i].size} #{ans[i].join(' ')}"
  end
else
  puts 'No'
end