N = gets.to_i
M = (1..N).find{ |m| m*(m-1)/2 == N }
if !M 
  puts "No"; exit
end

puts "Yes"
p M
es = {}
e = 1
(1..M).each{ |i|
  #p es[i]
  (i+1..M).each{ |j|
    es[i] ||= {}
    es[j] ||= {}
    es[i][j] = es[j][i] = e
    e += 1
  } 
  puts "#{M-1} #{es[i].values.join(" ")}"
}
