N = gets.to_i
k = (1..N).find{|k|
  k + (k * (k-1))/2 == N
}
if k.nil?
  puts "No"; exit
end
puts "Yes"

puts (1..k).to_a.join(' ')
sets = Array.new(k){|i| [i+1] }
n = k+1
for u in 0...k
  for v in (u+1)...k
    sets[u] << n
    sets[v] << n
    n += 1
  end
end
sets.each do |set|
  puts set.join(' ')
end