ntok = {3: 3, 6: 4, 10: 5, 15: 6, 21: 7, 28: 8, 36: 9, 45: 10, 55: 11, 66: 12, 78: 13, 91: 14, 105: 15,
        120: 16, 136: 17, 153: 18, 171: 19, 190: 20, 210: 21, 231: 22, 253: 23, 276: 24, 300: 25, 325: 26, 351: 27,
        378: 28, 406: 29, 435: 30, 465: 31, 496: 32, 528: 33, 561: 34, 595: 35, 630: 36, 666: 37, 703: 38, 741: 39,
        780: 40, 820: 41, 861: 42, 903: 43, 946: 44, 990: 45, 1035: 46, 1081: 47, 1128: 48, 1176: 49, 1225: 50,
        1275: 51, 1326: 52, 1378: 53, 1431: 54, 1485: 55, 1540: 56, 1596: 57, 1653: 58, 1711: 59, 1770: 60, 1830: 61,
        1891: 62, 1953: 63, 2016: 64, 2080: 65, 2145: 66, 2211: 67, 2278: 68, 2346: 69, 2415: 70, 2485: 71, 2556: 72,
        2628: 73, 2701: 74, 2775: 75, 2850: 76, 2926: 77, 3003: 78, 3081: 79, 3160: 80, 3240: 81, 3321: 82, 3403: 83,
        3486: 84, 3570: 85, 3655: 86, 3741: 87, 3828: 88, 3916: 89, 4005: 90, 4095: 91, 4186: 92, 4278: 93, 4371: 94,
        4465: 95, 4560: 96, 4656: 97, 4753: 98, 4851: 99, 4950: 100, 5050: 101, 5151: 102, 5253: 103, 5356: 104,
        5460: 105, 5565: 106, 5671: 107, 5778: 108, 5886: 109, 5995: 110, 6105: 111, 6216: 112, 6328: 113, 6441: 114,
        6555: 115, 6670: 116, 6786: 117, 6903: 118, 7021: 119, 7140: 120, 7260: 121, 7381: 122, 7503: 123, 7626: 124,
        7750: 125, 7875: 126, 8001: 127, 8128: 128, 8256: 129, 8385: 130, 8515: 131, 8646: 132, 8778: 133, 8911: 134,
        9045: 135, 9180: 136, 9316: 137, 9453: 138, 9591: 139, 9730: 140, 9870: 141, 10011: 142, 10153: 143, 10296: 144,
        10440: 145, 10585: 146, 10731: 147, 10878: 148, 11026: 149, 11175: 150, 11325: 151, 11476: 152, 11628: 153,
        11781: 154, 11935: 155, 12090: 156, 12246: 157, 12403: 158, 12561: 159, 12720: 160, 12880: 161, 13041: 162,
        13203: 163, 13366: 164, 13530: 165, 13695: 166, 13861: 167, 14028: 168, 14196: 169, 14365: 170, 14535: 171,
        14706: 172, 14878: 173, 15051: 174, 15225: 175, 15400: 176, 15576: 177, 15753: 178, 15931: 179, 16110: 180,
        16290: 181, 16471: 182, 16653: 183, 16836: 184, 17020: 185, 17205: 186, 17391: 187, 17578: 188, 17766: 189,
        17955: 190, 18145: 191, 18336: 192, 18528: 193, 18721: 194, 18915: 195, 19110: 196, 19306: 197, 19503: 198,
        19701: 199, 19900: 200, 20100: 201, 20301: 202, 20503: 203, 20706: 204, 20910: 205, 21115: 206, 21321: 207,
        21528: 208, 21736: 209, 21945: 210, 22155: 211, 22366: 212, 22578: 213, 22791: 214, 23005: 215, 23220: 216,
        23436: 217, 23653: 218, 23871: 219, 24090: 220, 24310: 221, 24531: 222, 24753: 223, 24976: 224, 25200: 225,
        25425: 226, 25651: 227, 25878: 228, 26106: 229, 26335: 230, 26565: 231, 26796: 232, 27028: 233, 27261: 234,
        27495: 235, 27730: 236, 27966: 237, 28203: 238, 28441: 239, 28680: 240, 28920: 241, 29161: 242, 29403: 243,
        29646: 244, 29890: 245, 30135: 246, 30381: 247, 30628: 248, 30876: 249, 31125: 250, 31375: 251, 31626: 252,
        31878: 253, 32131: 254, 32385: 255, 32640: 256, 32896: 257, 33153: 258, 33411: 259, 33670: 260, 33930: 261,
        34191: 262, 34453: 263, 34716: 264, 34980: 265, 35245: 266, 35511: 267, 35778: 268, 36046: 269, 36315: 270,
        36585: 271, 36856: 272, 37128: 273, 37401: 274, 37675: 275, 37950: 276, 38226: 277, 38503: 278, 38781: 279,
        39060: 280, 39340: 281, 39621: 282, 39903: 283, 40186: 284, 40470: 285, 40755: 286, 41041: 287, 41328: 288,
        41616: 289, 41905: 290, 42195: 291, 42486: 292, 42778: 293, 43071: 294, 43365: 295, 43660: 296, 43956: 297,
        44253: 298, 44551: 299, 44850: 300, 45150: 301, 45451: 302, 45753: 303, 46056: 304, 46360: 305, 46665: 306,
        46971: 307, 47278: 308, 47586: 309, 47895: 310, 48205: 311, 48516: 312, 48828: 313, 49141: 314, 49455: 315,
        49770: 316, 50086: 317, 50403: 318, 50721: 319, 51040: 320, 51360: 321, 51681: 322, 52003: 323, 52326: 324,
        52650: 325, 52975: 326, 53301: 327, 53628: 328, 53956: 329, 54285: 330, 54615: 331, 54946: 332, 55278: 333,
        55611: 334, 55945: 335, 56280: 336, 56616: 337, 56953: 338, 57291: 339, 57630: 340, 57970: 341, 58311: 342,
        58653: 343, 58996: 344, 59340: 345, 59685: 346, 60031: 347, 60378: 348, 60726: 349, 61075: 350, 61425: 351,
        61776: 352, 62128: 353, 62481: 354, 62835: 355, 63190: 356, 63546: 357, 63903: 358, 64261: 359, 64620: 360,
        64980: 361, 65341: 362, 65703: 363, 66066: 364, 66430: 365, 66795: 366, 67161: 367, 67528: 368, 67896: 369,
        68265: 370, 68635: 371, 69006: 372, 69378: 373, 69751: 374, 70125: 375, 70500: 376, 70876: 377, 71253: 378,
        71631: 379, 72010: 380, 72390: 381, 72771: 382, 73153: 383, 73536: 384, 73920: 385, 74305: 386, 74691: 387,
        75078: 388, 75466: 389, 75855: 390, 76245: 391, 76636: 392, 77028: 393, 77421: 394, 77815: 395, 78210: 396,
        78606: 397, 79003: 398, 79401: 399, 79800: 400, 80200: 401, 80601: 402, 81003: 403, 81406: 404, 81810: 405,
        82215: 406, 82621: 407, 83028: 408, 83436: 409, 83845: 410, 84255: 411, 84666: 412, 85078: 413, 85491: 414,
        85905: 415, 86320: 416, 86736: 417, 87153: 418, 87571: 419, 87990: 420, 88410: 421, 88831: 422, 89253: 423,
        89676: 424, 90100: 425, 90525: 426, 90951: 427, 91378: 428, 91806: 429, 92235: 430, 92665: 431, 93096: 432,
        93528: 433, 93961: 434, 94395: 435, 94830: 436, 95266: 437, 95703: 438, 96141: 439, 96580: 440, 97020: 441,
        97461: 442, 97903: 443, 98346: 444, 98790: 445, 99235: 446, 99681: 447}

n = int(input())

if n==1:
        print("Yes")
        print(2)
        print(1,1)
        print(1,1)
        exit()

if n not in ntok:
    print("No")
    exit()

k = ntok[n]
ans = [[] for _ in range(k)]
a = 0
for i in range(k):
    for j in range(i):
        a += 1
        ans[i].append(a)
        ans[j].append(a)

print("Yes")
print(k)
for s in ans: print(len(s),*s)


Measured memory_bytes: 13792