n = gets.to_i

if (1..n).find{|m|m*m-m == n*2}
  puts "Yes",n
  c = 0
  a = [m = n-1]
  1.upto(m){|y|
    a << k = -~y * y / 2
    d = 0
    $><< "#{m}"
    1.upto(m){|x|
      $><< " #{[k,x+c,y+d][y<=>x]}"
      d += x
    }
    c += y
    puts
  }
  puts a*" "
else
  puts "No"
end