N=gets.to_i

i = 0
sum = 0
while sum < N
  i += 1
  sum += i
end

if sum != N
  puts 'No'
  exit 0
end

a = Array.new(i+1) { Array.new(i,0) }

x = y = 0
c = 0
N.times do |j|
  # p [i,j,x,y]
  if x < i
    a[y][x] = a[x+1][y] = j+1
    x += 1
  else
    y+=1
    c+=1
    x=c
    a[y][x] = a[x+1][y] = j+1
    x+=1
  end
end

puts 'Yes'
puts a.length
a.each do|l|
  puts ([i]+l).join(' ')
end
