N = gets.to_i
h = {}
1.upto(1.0/0){|i|
  edge = i * (i - 1) / 2
  h[edge] = i
  break if edge > 10**5
}

if !h[N]
  puts:No
  exit
end

vortex = h[N]
edges = vortex.times.map{[]}
n = 1
vortex.times{|i|
  i.times{|j|
    edges[i] << n
    edges[j] << n
    n += 1
  }
}
puts:Yes
p vortex
edges.each{|e|
  puts [e.size, *e]* " "
}
