N = gets.to_i

k = 0
k += 1 while k*(k-1)/2 < N
if k*(k-1)/2 > N
    puts "No"
    exit
end

s = Array.new(k){[]}
pt = 1
k.times do |i|
    i.times do |j|
        s[i].push(pt)
        s[j].push(pt)
        pt += 1
    end
end
puts "Yes", k
s.each do |arr|
    print arr.length, " "
    puts arr.join(' ')
end