nu = gets.to_i
ar = Array.new(500, 0)
for i in 0..499
  ar[i] = (i + 1)*(i + 2)
end
count = 0
for i in 0..499
  if nu*2 == ar[i]
    count = i + 2
    break
  end
  if i == 499
    puts "No"
    exit
  end
end

puts "Yes"
puts count
count2 = 0
array = Array.new(count - 1).map{Array.new(count - 1, 0)}
for i in 0..count - 2
  for j in 0..i
    count2 += 1
    array[i][j] = count2
  end
end
for i in 0..count - 2
  print "#{count - 1}"
  check1 = 0
  check2 = 0
  for j in 0..count - 2
    print " #{array[i + check2][check1]}"
    if check1 < i
      check1 += 1
    else
      check2 += 1
    end
  end
  puts ""
end
print "#{count - 1}"
for i in 0..count - 2
  print " #{array[i][i]}"
end
