Skip to content

Instantly share code, notes, and snippets.

@samueltangz
Created Nov 10, 2021
Embed
What would you like to do?
HKCERT CTF 2021: A Junior Mathematician
p = [0 for _ in range(2000)]
flag = b'...'
p[1] = 1
for i, c in enumerate(flag):
p[i+2] = c
while True:
if sum(p) == p[0]: print(chr(p[0] & 0x7f), end='')
if p[2] >= 2: p[2] += -2; p[102] += 1; continue
if p[3] >= 2: p[3] += -2; p[103] += 1; continue
if p[4] >= 2: p[4] += -2; p[104] += 1; continue
if p[5] >= 2: p[5] += -2; p[105] += 1; continue
if p[6] >= 2: p[6] += -2; p[106] += 1; continue
if p[7] >= 2: p[7] += -2; p[107] += 1; continue
if p[8] >= 2: p[8] += -2; p[108] += 1; continue
if p[9] >= 2: p[9] += -2; p[109] += 1; continue
if p[10] >= 2: p[10] += -2; p[110] += 1; continue
if p[11] >= 2: p[11] += -2; p[111] += 1; continue
if p[12] >= 2: p[12] += -2; p[112] += 1; continue
if p[13] >= 2: p[13] += -2; p[113] += 1; continue
if p[14] >= 2: p[14] += -2; p[114] += 1; continue
if p[15] >= 2: p[15] += -2; p[115] += 1; continue
if p[16] >= 2: p[16] += -2; p[116] += 1; continue
if p[17] >= 2: p[17] += -2; p[117] += 1; continue
if p[18] >= 2: p[18] += -2; p[118] += 1; continue
if p[19] >= 2: p[19] += -2; p[119] += 1; continue
if p[20] >= 2: p[20] += -2; p[120] += 1; continue
if p[21] >= 2: p[21] += -2; p[121] += 1; continue
if p[22] >= 2: p[22] += -2; p[122] += 1; continue
if p[23] >= 2: p[23] += -2; p[123] += 1; continue
if p[24] >= 2: p[24] += -2; p[124] += 1; continue
if p[25] >= 2: p[25] += -2; p[125] += 1; continue
if p[26] >= 2: p[26] += -2; p[126] += 1; continue
if p[27] >= 2: p[27] += -2; p[127] += 1; continue
if p[28] >= 2: p[28] += -2; p[128] += 1; continue
if p[29] >= 2: p[29] += -2; p[129] += 1; continue
if p[30] >= 2: p[30] += -2; p[130] += 1; continue
if p[31] >= 2: p[31] += -2; p[131] += 1; continue
if p[32] >= 2: p[32] += -2; p[132] += 1; continue
if p[33] >= 2: p[33] += -2; p[133] += 1; continue
if p[34] >= 2: p[34] += -2; p[134] += 1; continue
if p[35] >= 2: p[35] += -2; p[135] += 1; continue
if p[36] >= 2: p[36] += -2; p[136] += 1; continue
if p[37] >= 2: p[37] += -2; p[137] += 1; continue
if p[38] >= 2: p[38] += -2; p[138] += 1; continue
if p[39] >= 2: p[39] += -2; p[139] += 1; continue
if p[40] >= 2: p[40] += -2; p[140] += 1; continue
if p[41] >= 2: p[41] += -2; p[141] += 1; continue
if p[42] >= 2: p[42] += -2; p[142] += 1; continue
if p[43] >= 2: p[43] += -2; p[143] += 1; continue
if p[44] >= 2: p[44] += -2; p[144] += 1; continue
if p[45] >= 2: p[45] += -2; p[145] += 1; continue
if p[46] >= 2: p[46] += -2; p[146] += 1; continue
if p[47] >= 2: p[47] += -2; p[147] += 1; continue
if p[48] >= 2: p[48] += -2; p[148] += 1; continue
if p[49] >= 2: p[49] += -2; p[149] += 1; continue
if p[50] >= 2: p[50] += -2; p[150] += 1; continue
if p[51] >= 2: p[51] += -2; p[151] += 1; continue
if p[52] >= 2: p[52] += -2; p[152] += 1; continue
if p[53] >= 2: p[53] += -2; p[153] += 1; continue
if p[54] >= 2: p[54] += -2; p[154] += 1; continue
if p[55] >= 2: p[55] += -2; p[155] += 1; continue
if p[56] >= 2: p[56] += -2; p[156] += 1; continue
if p[57] >= 2: p[57] += -2; p[157] += 1; continue
if p[58] >= 2: p[58] += -2; p[158] += 1; continue
if p[59] >= 2: p[59] += -2; p[159] += 1; continue
if p[60] >= 2: p[60] += -2; p[160] += 1; continue
if p[61] >= 2: p[61] += -2; p[161] += 1; continue
if p[62] >= 2: p[62] += -2; p[162] += 1; continue
if p[63] >= 2: p[63] += -2; p[163] += 1; continue
if p[64] >= 2: p[64] += -2; p[164] += 1; continue
if p[65] >= 2: p[65] += -2; p[165] += 1; continue
if p[66] >= 2: p[66] += -2; p[166] += 1; continue
if p[67] >= 2: p[67] += -2; p[167] += 1; continue
if p[68] >= 2: p[68] += -2; p[168] += 1; continue
if p[69] >= 2: p[69] += -2; p[169] += 1; continue
if p[70] >= 2: p[70] += -2; p[170] += 1; continue
if p[71] >= 2: p[71] += -2; p[171] += 1; continue
if p[72] >= 2: p[72] += -2; p[172] += 1; continue
if p[73] >= 2: p[73] += -2; p[173] += 1; continue
if p[74] >= 2: p[74] += -2; p[174] += 1; continue
if p[75] >= 2: p[75] += -2; p[175] += 1; continue
if p[76] >= 2: p[76] += -2; p[176] += 1; continue
if p[77] >= 2: p[77] += -2; p[177] += 1; continue
if p[78] >= 2: p[78] += -2; p[178] += 1; continue
if p[79] >= 2: p[79] += -2; p[179] += 1; continue
if p[80] >= 2: p[80] += -2; p[180] += 1; continue
if p[81] >= 2: p[81] += -2; p[181] += 1; continue
if p[82] >= 2: p[82] += -2; p[182] += 1; continue
if p[83] >= 2: p[83] += -2; p[183] += 1; continue
if p[84] >= 2: p[84] += -2; p[184] += 1; continue
if p[85] >= 2: p[85] += -2; p[185] += 1; continue
if p[86] >= 2: p[86] += -2; p[186] += 1; continue
if p[87] >= 2: p[87] += -2; p[187] += 1; continue
if p[88] >= 2: p[88] += -2; p[188] += 1; continue
if p[89] >= 2: p[89] += -2; p[189] += 1; continue
if p[90] >= 2: p[90] += -2; p[190] += 1; continue
if p[91] >= 2: p[91] += -2; p[191] += 1; continue
if p[92] >= 2: p[92] += -2; p[192] += 1; continue
if p[93] >= 2: p[93] += -2; p[193] += 1; continue
if p[94] >= 2: p[94] += -2; p[194] += 1; continue
if p[95] >= 2: p[95] += -2; p[195] += 1; continue
if p[96] >= 2: p[96] += -2; p[196] += 1; continue
if p[97] >= 2: p[97] += -2; p[197] += 1; continue
if p[98] >= 2: p[98] += -2; p[198] += 1; continue
if p[99] >= 2: p[99] += -2; p[199] += 1; continue
if p[100] >= 2: p[100] += -2; p[200] += 1; continue
if p[101] >= 2: p[101] += -2; p[201] += 1; continue
if p[102] >= 2: p[102] += -2; p[202] += 1; continue
if p[103] >= 2: p[103] += -2; p[203] += 1; continue
if p[104] >= 2: p[104] += -2; p[204] += 1; continue
if p[105] >= 2: p[105] += -2; p[205] += 1; continue
if p[106] >= 2: p[106] += -2; p[206] += 1; continue
if p[107] >= 2: p[107] += -2; p[207] += 1; continue
if p[108] >= 2: p[108] += -2; p[208] += 1; continue
if p[109] >= 2: p[109] += -2; p[209] += 1; continue
if p[110] >= 2: p[110] += -2; p[210] += 1; continue
if p[111] >= 2: p[111] += -2; p[211] += 1; continue
if p[112] >= 2: p[112] += -2; p[212] += 1; continue
if p[113] >= 2: p[113] += -2; p[213] += 1; continue
if p[114] >= 2: p[114] += -2; p[214] += 1; continue
if p[115] >= 2: p[115] += -2; p[215] += 1; continue
if p[116] >= 2: p[116] += -2; p[216] += 1; continue
if p[117] >= 2: p[117] += -2; p[217] += 1; continue
if p[118] >= 2: p[118] += -2; p[218] += 1; continue
if p[119] >= 2: p[119] += -2; p[219] += 1; continue
if p[120] >= 2: p[120] += -2; p[220] += 1; continue
if p[121] >= 2: p[121] += -2; p[221] += 1; continue
if p[122] >= 2: p[122] += -2; p[222] += 1; continue
if p[123] >= 2: p[123] += -2; p[223] += 1; continue
if p[124] >= 2: p[124] += -2; p[224] += 1; continue
if p[125] >= 2: p[125] += -2; p[225] += 1; continue
if p[126] >= 2: p[126] += -2; p[226] += 1; continue
if p[127] >= 2: p[127] += -2; p[227] += 1; continue
if p[128] >= 2: p[128] += -2; p[228] += 1; continue
if p[129] >= 2: p[129] += -2; p[229] += 1; continue
if p[130] >= 2: p[130] += -2; p[230] += 1; continue
if p[131] >= 2: p[131] += -2; p[231] += 1; continue
if p[132] >= 2: p[132] += -2; p[232] += 1; continue
if p[133] >= 2: p[133] += -2; p[233] += 1; continue
if p[134] >= 2: p[134] += -2; p[234] += 1; continue
if p[135] >= 2: p[135] += -2; p[235] += 1; continue
if p[136] >= 2: p[136] += -2; p[236] += 1; continue
if p[137] >= 2: p[137] += -2; p[237] += 1; continue
if p[138] >= 2: p[138] += -2; p[238] += 1; continue
if p[139] >= 2: p[139] += -2; p[239] += 1; continue
if p[140] >= 2: p[140] += -2; p[240] += 1; continue
if p[141] >= 2: p[141] += -2; p[241] += 1; continue
if p[142] >= 2: p[142] += -2; p[242] += 1; continue
if p[143] >= 2: p[143] += -2; p[243] += 1; continue
if p[144] >= 2: p[144] += -2; p[244] += 1; continue
if p[145] >= 2: p[145] += -2; p[245] += 1; continue
if p[146] >= 2: p[146] += -2; p[246] += 1; continue
if p[147] >= 2: p[147] += -2; p[247] += 1; continue
if p[148] >= 2: p[148] += -2; p[248] += 1; continue
if p[149] >= 2: p[149] += -2; p[249] += 1; continue
if p[150] >= 2: p[150] += -2; p[250] += 1; continue
if p[151] >= 2: p[151] += -2; p[251] += 1; continue
if p[152] >= 2: p[152] += -2; p[252] += 1; continue
if p[153] >= 2: p[153] += -2; p[253] += 1; continue
if p[154] >= 2: p[154] += -2; p[254] += 1; continue
if p[155] >= 2: p[155] += -2; p[255] += 1; continue
if p[156] >= 2: p[156] += -2; p[256] += 1; continue
if p[157] >= 2: p[157] += -2; p[257] += 1; continue
if p[158] >= 2: p[158] += -2; p[258] += 1; continue
if p[159] >= 2: p[159] += -2; p[259] += 1; continue
if p[160] >= 2: p[160] += -2; p[260] += 1; continue
if p[161] >= 2: p[161] += -2; p[261] += 1; continue
if p[162] >= 2: p[162] += -2; p[262] += 1; continue
if p[163] >= 2: p[163] += -2; p[263] += 1; continue
if p[164] >= 2: p[164] += -2; p[264] += 1; continue
if p[165] >= 2: p[165] += -2; p[265] += 1; continue
if p[166] >= 2: p[166] += -2; p[266] += 1; continue
if p[167] >= 2: p[167] += -2; p[267] += 1; continue
if p[168] >= 2: p[168] += -2; p[268] += 1; continue
if p[169] >= 2: p[169] += -2; p[269] += 1; continue
if p[170] >= 2: p[170] += -2; p[270] += 1; continue
if p[171] >= 2: p[171] += -2; p[271] += 1; continue
if p[172] >= 2: p[172] += -2; p[272] += 1; continue
if p[173] >= 2: p[173] += -2; p[273] += 1; continue
if p[174] >= 2: p[174] += -2; p[274] += 1; continue
if p[175] >= 2: p[175] += -2; p[275] += 1; continue
if p[176] >= 2: p[176] += -2; p[276] += 1; continue
if p[177] >= 2: p[177] += -2; p[277] += 1; continue
if p[178] >= 2: p[178] += -2; p[278] += 1; continue
if p[179] >= 2: p[179] += -2; p[279] += 1; continue
if p[180] >= 2: p[180] += -2; p[280] += 1; continue
if p[181] >= 2: p[181] += -2; p[281] += 1; continue
if p[182] >= 2: p[182] += -2; p[282] += 1; continue
if p[183] >= 2: p[183] += -2; p[283] += 1; continue
if p[184] >= 2: p[184] += -2; p[284] += 1; continue
if p[185] >= 2: p[185] += -2; p[285] += 1; continue
if p[186] >= 2: p[186] += -2; p[286] += 1; continue
if p[187] >= 2: p[187] += -2; p[287] += 1; continue
if p[188] >= 2: p[188] += -2; p[288] += 1; continue
if p[189] >= 2: p[189] += -2; p[289] += 1; continue
if p[190] >= 2: p[190] += -2; p[290] += 1; continue
if p[191] >= 2: p[191] += -2; p[291] += 1; continue
if p[192] >= 2: p[192] += -2; p[292] += 1; continue
if p[193] >= 2: p[193] += -2; p[293] += 1; continue
if p[194] >= 2: p[194] += -2; p[294] += 1; continue
if p[195] >= 2: p[195] += -2; p[295] += 1; continue
if p[196] >= 2: p[196] += -2; p[296] += 1; continue
if p[197] >= 2: p[197] += -2; p[297] += 1; continue
if p[198] >= 2: p[198] += -2; p[298] += 1; continue
if p[199] >= 2: p[199] += -2; p[299] += 1; continue
if p[200] >= 2: p[200] += -2; p[300] += 1; continue
if p[201] >= 2: p[201] += -2; p[301] += 1; continue
if p[202] >= 2: p[202] += -2; p[302] += 1; continue
if p[203] >= 2: p[203] += -2; p[303] += 1; continue
if p[204] >= 2: p[204] += -2; p[304] += 1; continue
if p[205] >= 2: p[205] += -2; p[305] += 1; continue
if p[206] >= 2: p[206] += -2; p[306] += 1; continue
if p[207] >= 2: p[207] += -2; p[307] += 1; continue
if p[208] >= 2: p[208] += -2; p[308] += 1; continue
if p[209] >= 2: p[209] += -2; p[309] += 1; continue
if p[210] >= 2: p[210] += -2; p[310] += 1; continue
if p[211] >= 2: p[211] += -2; p[311] += 1; continue
if p[212] >= 2: p[212] += -2; p[312] += 1; continue
if p[213] >= 2: p[213] += -2; p[313] += 1; continue
if p[214] >= 2: p[214] += -2; p[314] += 1; continue
if p[215] >= 2: p[215] += -2; p[315] += 1; continue
if p[216] >= 2: p[216] += -2; p[316] += 1; continue
if p[217] >= 2: p[217] += -2; p[317] += 1; continue
if p[218] >= 2: p[218] += -2; p[318] += 1; continue
if p[219] >= 2: p[219] += -2; p[319] += 1; continue
if p[220] >= 2: p[220] += -2; p[320] += 1; continue
if p[221] >= 2: p[221] += -2; p[321] += 1; continue
if p[222] >= 2: p[222] += -2; p[322] += 1; continue
if p[223] >= 2: p[223] += -2; p[323] += 1; continue
if p[224] >= 2: p[224] += -2; p[324] += 1; continue
if p[225] >= 2: p[225] += -2; p[325] += 1; continue
if p[226] >= 2: p[226] += -2; p[326] += 1; continue
if p[227] >= 2: p[227] += -2; p[327] += 1; continue
if p[228] >= 2: p[228] += -2; p[328] += 1; continue
if p[229] >= 2: p[229] += -2; p[329] += 1; continue
if p[230] >= 2: p[230] += -2; p[330] += 1; continue
if p[231] >= 2: p[231] += -2; p[331] += 1; continue
if p[232] >= 2: p[232] += -2; p[332] += 1; continue
if p[233] >= 2: p[233] += -2; p[333] += 1; continue
if p[234] >= 2: p[234] += -2; p[334] += 1; continue
if p[235] >= 2: p[235] += -2; p[335] += 1; continue
if p[236] >= 2: p[236] += -2; p[336] += 1; continue
if p[237] >= 2: p[237] += -2; p[337] += 1; continue
if p[238] >= 2: p[238] += -2; p[338] += 1; continue
if p[239] >= 2: p[239] += -2; p[339] += 1; continue
if p[240] >= 2: p[240] += -2; p[340] += 1; continue
if p[241] >= 2: p[241] += -2; p[341] += 1; continue
if p[242] >= 2: p[242] += -2; p[342] += 1; continue
if p[243] >= 2: p[243] += -2; p[343] += 1; continue
if p[244] >= 2: p[244] += -2; p[344] += 1; continue
if p[245] >= 2: p[245] += -2; p[345] += 1; continue
if p[246] >= 2: p[246] += -2; p[346] += 1; continue
if p[247] >= 2: p[247] += -2; p[347] += 1; continue
if p[248] >= 2: p[248] += -2; p[348] += 1; continue
if p[249] >= 2: p[249] += -2; p[349] += 1; continue
if p[250] >= 2: p[250] += -2; p[350] += 1; continue
if p[251] >= 2: p[251] += -2; p[351] += 1; continue
if p[252] >= 2: p[252] += -2; p[352] += 1; continue
if p[253] >= 2: p[253] += -2; p[353] += 1; continue
if p[254] >= 2: p[254] += -2; p[354] += 1; continue
if p[255] >= 2: p[255] += -2; p[355] += 1; continue
if p[256] >= 2: p[256] += -2; p[356] += 1; continue
if p[257] >= 2: p[257] += -2; p[357] += 1; continue
if p[258] >= 2: p[258] += -2; p[358] += 1; continue
if p[259] >= 2: p[259] += -2; p[359] += 1; continue
if p[260] >= 2: p[260] += -2; p[360] += 1; continue
if p[261] >= 2: p[261] += -2; p[361] += 1; continue
if p[262] >= 2: p[262] += -2; p[362] += 1; continue
if p[263] >= 2: p[263] += -2; p[363] += 1; continue
if p[264] >= 2: p[264] += -2; p[364] += 1; continue
if p[265] >= 2: p[265] += -2; p[365] += 1; continue
if p[266] >= 2: p[266] += -2; p[366] += 1; continue
if p[267] >= 2: p[267] += -2; p[367] += 1; continue
if p[268] >= 2: p[268] += -2; p[368] += 1; continue
if p[269] >= 2: p[269] += -2; p[369] += 1; continue
if p[270] >= 2: p[270] += -2; p[370] += 1; continue
if p[271] >= 2: p[271] += -2; p[371] += 1; continue
if p[272] >= 2: p[272] += -2; p[372] += 1; continue
if p[273] >= 2: p[273] += -2; p[373] += 1; continue
if p[274] >= 2: p[274] += -2; p[374] += 1; continue
if p[275] >= 2: p[275] += -2; p[375] += 1; continue
if p[276] >= 2: p[276] += -2; p[376] += 1; continue
if p[277] >= 2: p[277] += -2; p[377] += 1; continue
if p[278] >= 2: p[278] += -2; p[378] += 1; continue
if p[279] >= 2: p[279] += -2; p[379] += 1; continue
if p[280] >= 2: p[280] += -2; p[380] += 1; continue
if p[281] >= 2: p[281] += -2; p[381] += 1; continue
if p[282] >= 2: p[282] += -2; p[382] += 1; continue
if p[283] >= 2: p[283] += -2; p[383] += 1; continue
if p[284] >= 2: p[284] += -2; p[384] += 1; continue
if p[285] >= 2: p[285] += -2; p[385] += 1; continue
if p[286] >= 2: p[286] += -2; p[386] += 1; continue
if p[287] >= 2: p[287] += -2; p[387] += 1; continue
if p[288] >= 2: p[288] += -2; p[388] += 1; continue
if p[289] >= 2: p[289] += -2; p[389] += 1; continue
if p[290] >= 2: p[290] += -2; p[390] += 1; continue
if p[291] >= 2: p[291] += -2; p[391] += 1; continue
if p[292] >= 2: p[292] += -2; p[392] += 1; continue
if p[293] >= 2: p[293] += -2; p[393] += 1; continue
if p[294] >= 2: p[294] += -2; p[394] += 1; continue
if p[295] >= 2: p[295] += -2; p[395] += 1; continue
if p[296] >= 2: p[296] += -2; p[396] += 1; continue
if p[297] >= 2: p[297] += -2; p[397] += 1; continue
if p[298] >= 2: p[298] += -2; p[398] += 1; continue
if p[299] >= 2: p[299] += -2; p[399] += 1; continue
if p[300] >= 2: p[300] += -2; p[400] += 1; continue
if p[301] >= 2: p[301] += -2; p[401] += 1; continue
if p[302] >= 2: p[302] += -2; p[402] += 1; continue
if p[303] >= 2: p[303] += -2; p[403] += 1; continue
if p[304] >= 2: p[304] += -2; p[404] += 1; continue
if p[305] >= 2: p[305] += -2; p[405] += 1; continue
if p[306] >= 2: p[306] += -2; p[406] += 1; continue
if p[307] >= 2: p[307] += -2; p[407] += 1; continue
if p[308] >= 2: p[308] += -2; p[408] += 1; continue
if p[309] >= 2: p[309] += -2; p[409] += 1; continue
if p[310] >= 2: p[310] += -2; p[410] += 1; continue
if p[311] >= 2: p[311] += -2; p[411] += 1; continue
if p[312] >= 2: p[312] += -2; p[412] += 1; continue
if p[313] >= 2: p[313] += -2; p[413] += 1; continue
if p[314] >= 2: p[314] += -2; p[414] += 1; continue
if p[315] >= 2: p[315] += -2; p[415] += 1; continue
if p[316] >= 2: p[316] += -2; p[416] += 1; continue
if p[317] >= 2: p[317] += -2; p[417] += 1; continue
if p[318] >= 2: p[318] += -2; p[418] += 1; continue
if p[319] >= 2: p[319] += -2; p[419] += 1; continue
if p[320] >= 2: p[320] += -2; p[420] += 1; continue
if p[321] >= 2: p[321] += -2; p[421] += 1; continue
if p[322] >= 2: p[322] += -2; p[422] += 1; continue
if p[323] >= 2: p[323] += -2; p[423] += 1; continue
if p[324] >= 2: p[324] += -2; p[424] += 1; continue
if p[325] >= 2: p[325] += -2; p[425] += 1; continue
if p[326] >= 2: p[326] += -2; p[426] += 1; continue
if p[327] >= 2: p[327] += -2; p[427] += 1; continue
if p[328] >= 2: p[328] += -2; p[428] += 1; continue
if p[329] >= 2: p[329] += -2; p[429] += 1; continue
if p[330] >= 2: p[330] += -2; p[430] += 1; continue
if p[331] >= 2: p[331] += -2; p[431] += 1; continue
if p[332] >= 2: p[332] += -2; p[432] += 1; continue
if p[333] >= 2: p[333] += -2; p[433] += 1; continue
if p[334] >= 2: p[334] += -2; p[434] += 1; continue
if p[335] >= 2: p[335] += -2; p[435] += 1; continue
if p[336] >= 2: p[336] += -2; p[436] += 1; continue
if p[337] >= 2: p[337] += -2; p[437] += 1; continue
if p[338] >= 2: p[338] += -2; p[438] += 1; continue
if p[339] >= 2: p[339] += -2; p[439] += 1; continue
if p[340] >= 2: p[340] += -2; p[440] += 1; continue
if p[341] >= 2: p[341] += -2; p[441] += 1; continue
if p[342] >= 2: p[342] += -2; p[442] += 1; continue
if p[343] >= 2: p[343] += -2; p[443] += 1; continue
if p[344] >= 2: p[344] += -2; p[444] += 1; continue
if p[345] >= 2: p[345] += -2; p[445] += 1; continue
if p[346] >= 2: p[346] += -2; p[446] += 1; continue
if p[347] >= 2: p[347] += -2; p[447] += 1; continue
if p[348] >= 2: p[348] += -2; p[448] += 1; continue
if p[349] >= 2: p[349] += -2; p[449] += 1; continue
if p[350] >= 2: p[350] += -2; p[450] += 1; continue
if p[351] >= 2: p[351] += -2; p[451] += 1; continue
if p[352] >= 2: p[352] += -2; p[452] += 1; continue
if p[353] >= 2: p[353] += -2; p[453] += 1; continue
if p[354] >= 2: p[354] += -2; p[454] += 1; continue
if p[355] >= 2: p[355] += -2; p[455] += 1; continue
if p[356] >= 2: p[356] += -2; p[456] += 1; continue
if p[357] >= 2: p[357] += -2; p[457] += 1; continue
if p[358] >= 2: p[358] += -2; p[458] += 1; continue
if p[359] >= 2: p[359] += -2; p[459] += 1; continue
if p[360] >= 2: p[360] += -2; p[460] += 1; continue
if p[361] >= 2: p[361] += -2; p[461] += 1; continue
if p[362] >= 2: p[362] += -2; p[462] += 1; continue
if p[363] >= 2: p[363] += -2; p[463] += 1; continue
if p[364] >= 2: p[364] += -2; p[464] += 1; continue
if p[365] >= 2: p[365] += -2; p[465] += 1; continue
if p[366] >= 2: p[366] += -2; p[466] += 1; continue
if p[367] >= 2: p[367] += -2; p[467] += 1; continue
if p[368] >= 2: p[368] += -2; p[468] += 1; continue
if p[369] >= 2: p[369] += -2; p[469] += 1; continue
if p[370] >= 2: p[370] += -2; p[470] += 1; continue
if p[371] >= 2: p[371] += -2; p[471] += 1; continue
if p[372] >= 2: p[372] += -2; p[472] += 1; continue
if p[373] >= 2: p[373] += -2; p[473] += 1; continue
if p[374] >= 2: p[374] += -2; p[474] += 1; continue
if p[375] >= 2: p[375] += -2; p[475] += 1; continue
if p[376] >= 2: p[376] += -2; p[476] += 1; continue
if p[377] >= 2: p[377] += -2; p[477] += 1; continue
if p[378] >= 2: p[378] += -2; p[478] += 1; continue
if p[379] >= 2: p[379] += -2; p[479] += 1; continue
if p[380] >= 2: p[380] += -2; p[480] += 1; continue
if p[381] >= 2: p[381] += -2; p[481] += 1; continue
if p[382] >= 2: p[382] += -2; p[482] += 1; continue
if p[383] >= 2: p[383] += -2; p[483] += 1; continue
if p[384] >= 2: p[384] += -2; p[484] += 1; continue
if p[385] >= 2: p[385] += -2; p[485] += 1; continue
if p[386] >= 2: p[386] += -2; p[486] += 1; continue
if p[387] >= 2: p[387] += -2; p[487] += 1; continue
if p[388] >= 2: p[388] += -2; p[488] += 1; continue
if p[389] >= 2: p[389] += -2; p[489] += 1; continue
if p[390] >= 2: p[390] += -2; p[490] += 1; continue
if p[391] >= 2: p[391] += -2; p[491] += 1; continue
if p[392] >= 2: p[392] += -2; p[492] += 1; continue
if p[393] >= 2: p[393] += -2; p[493] += 1; continue
if p[394] >= 2: p[394] += -2; p[494] += 1; continue
if p[395] >= 2: p[395] += -2; p[495] += 1; continue
if p[396] >= 2: p[396] += -2; p[496] += 1; continue
if p[397] >= 2: p[397] += -2; p[497] += 1; continue
if p[398] >= 2: p[398] += -2; p[498] += 1; continue
if p[399] >= 2: p[399] += -2; p[499] += 1; continue
if p[400] >= 2: p[400] += -2; p[500] += 1; continue
if p[401] >= 2: p[401] += -2; p[501] += 1; continue
if p[402] >= 2: p[402] += -2; p[502] += 1; continue
if p[403] >= 2: p[403] += -2; p[503] += 1; continue
if p[404] >= 2: p[404] += -2; p[504] += 1; continue
if p[405] >= 2: p[405] += -2; p[505] += 1; continue
if p[406] >= 2: p[406] += -2; p[506] += 1; continue
if p[407] >= 2: p[407] += -2; p[507] += 1; continue
if p[408] >= 2: p[408] += -2; p[508] += 1; continue
if p[409] >= 2: p[409] += -2; p[509] += 1; continue
if p[410] >= 2: p[410] += -2; p[510] += 1; continue
if p[411] >= 2: p[411] += -2; p[511] += 1; continue
if p[412] >= 2: p[412] += -2; p[512] += 1; continue
if p[413] >= 2: p[413] += -2; p[513] += 1; continue
if p[414] >= 2: p[414] += -2; p[514] += 1; continue
if p[415] >= 2: p[415] += -2; p[515] += 1; continue
if p[416] >= 2: p[416] += -2; p[516] += 1; continue
if p[417] >= 2: p[417] += -2; p[517] += 1; continue
if p[418] >= 2: p[418] += -2; p[518] += 1; continue
if p[419] >= 2: p[419] += -2; p[519] += 1; continue
if p[420] >= 2: p[420] += -2; p[520] += 1; continue
if p[421] >= 2: p[421] += -2; p[521] += 1; continue
if p[422] >= 2: p[422] += -2; p[522] += 1; continue
if p[423] >= 2: p[423] += -2; p[523] += 1; continue
if p[424] >= 2: p[424] += -2; p[524] += 1; continue
if p[425] >= 2: p[425] += -2; p[525] += 1; continue
if p[426] >= 2: p[426] += -2; p[526] += 1; continue
if p[427] >= 2: p[427] += -2; p[527] += 1; continue
if p[428] >= 2: p[428] += -2; p[528] += 1; continue
if p[429] >= 2: p[429] += -2; p[529] += 1; continue
if p[430] >= 2: p[430] += -2; p[530] += 1; continue
if p[431] >= 2: p[431] += -2; p[531] += 1; continue
if p[432] >= 2: p[432] += -2; p[532] += 1; continue
if p[433] >= 2: p[433] += -2; p[533] += 1; continue
if p[434] >= 2: p[434] += -2; p[534] += 1; continue
if p[435] >= 2: p[435] += -2; p[535] += 1; continue
if p[436] >= 2: p[436] += -2; p[536] += 1; continue
if p[437] >= 2: p[437] += -2; p[537] += 1; continue
if p[438] >= 2: p[438] += -2; p[538] += 1; continue
if p[439] >= 2: p[439] += -2; p[539] += 1; continue
if p[440] >= 2: p[440] += -2; p[540] += 1; continue
if p[441] >= 2: p[441] += -2; p[541] += 1; continue
if p[442] >= 2: p[442] += -2; p[542] += 1; continue
if p[443] >= 2: p[443] += -2; p[543] += 1; continue
if p[444] >= 2: p[444] += -2; p[544] += 1; continue
if p[445] >= 2: p[445] += -2; p[545] += 1; continue
if p[446] >= 2: p[446] += -2; p[546] += 1; continue
if p[447] >= 2: p[447] += -2; p[547] += 1; continue
if p[448] >= 2: p[448] += -2; p[548] += 1; continue
if p[449] >= 2: p[449] += -2; p[549] += 1; continue
if p[450] >= 2: p[450] += -2; p[550] += 1; continue
if p[451] >= 2: p[451] += -2; p[551] += 1; continue
if p[452] >= 2: p[452] += -2; p[552] += 1; continue
if p[453] >= 2: p[453] += -2; p[553] += 1; continue
if p[454] >= 2: p[454] += -2; p[554] += 1; continue
if p[455] >= 2: p[455] += -2; p[555] += 1; continue
if p[456] >= 2: p[456] += -2; p[556] += 1; continue
if p[457] >= 2: p[457] += -2; p[557] += 1; continue
if p[458] >= 2: p[458] += -2; p[558] += 1; continue
if p[459] >= 2: p[459] += -2; p[559] += 1; continue
if p[460] >= 2: p[460] += -2; p[560] += 1; continue
if p[461] >= 2: p[461] += -2; p[561] += 1; continue
if p[462] >= 2: p[462] += -2; p[562] += 1; continue
if p[463] >= 2: p[463] += -2; p[563] += 1; continue
if p[464] >= 2: p[464] += -2; p[564] += 1; continue
if p[465] >= 2: p[465] += -2; p[565] += 1; continue
if p[466] >= 2: p[466] += -2; p[566] += 1; continue
if p[467] >= 2: p[467] += -2; p[567] += 1; continue
if p[468] >= 2: p[468] += -2; p[568] += 1; continue
if p[469] >= 2: p[469] += -2; p[569] += 1; continue
if p[470] >= 2: p[470] += -2; p[570] += 1; continue
if p[471] >= 2: p[471] += -2; p[571] += 1; continue
if p[472] >= 2: p[472] += -2; p[572] += 1; continue
if p[473] >= 2: p[473] += -2; p[573] += 1; continue
if p[474] >= 2: p[474] += -2; p[574] += 1; continue
if p[475] >= 2: p[475] += -2; p[575] += 1; continue
if p[476] >= 2: p[476] += -2; p[576] += 1; continue
if p[477] >= 2: p[477] += -2; p[577] += 1; continue
if p[478] >= 2: p[478] += -2; p[578] += 1; continue
if p[479] >= 2: p[479] += -2; p[579] += 1; continue
if p[480] >= 2: p[480] += -2; p[580] += 1; continue
if p[481] >= 2: p[481] += -2; p[581] += 1; continue
if p[482] >= 2: p[482] += -2; p[582] += 1; continue
if p[483] >= 2: p[483] += -2; p[583] += 1; continue
if p[484] >= 2: p[484] += -2; p[584] += 1; continue
if p[485] >= 2: p[485] += -2; p[585] += 1; continue
if p[486] >= 2: p[486] += -2; p[586] += 1; continue
if p[487] >= 2: p[487] += -2; p[587] += 1; continue
if p[488] >= 2: p[488] += -2; p[588] += 1; continue
if p[489] >= 2: p[489] += -2; p[589] += 1; continue
if p[490] >= 2: p[490] += -2; p[590] += 1; continue
if p[491] >= 2: p[491] += -2; p[591] += 1; continue
if p[492] >= 2: p[492] += -2; p[592] += 1; continue
if p[493] >= 2: p[493] += -2; p[593] += 1; continue
if p[494] >= 2: p[494] += -2; p[594] += 1; continue
if p[495] >= 2: p[495] += -2; p[595] += 1; continue
if p[496] >= 2: p[496] += -2; p[596] += 1; continue
if p[497] >= 2: p[497] += -2; p[597] += 1; continue
if p[498] >= 2: p[498] += -2; p[598] += 1; continue
if p[499] >= 2: p[499] += -2; p[599] += 1; continue
if p[500] >= 2: p[500] += -2; p[600] += 1; continue
if p[501] >= 2: p[501] += -2; p[601] += 1; continue
if p[502] >= 2: p[502] += -2; p[602] += 1; continue
if p[503] >= 2: p[503] += -2; p[603] += 1; continue
if p[504] >= 2: p[504] += -2; p[604] += 1; continue
if p[505] >= 2: p[505] += -2; p[605] += 1; continue
if p[506] >= 2: p[506] += -2; p[606] += 1; continue
if p[507] >= 2: p[507] += -2; p[607] += 1; continue
if p[508] >= 2: p[508] += -2; p[608] += 1; continue
if p[509] >= 2: p[509] += -2; p[609] += 1; continue
if p[510] >= 2: p[510] += -2; p[610] += 1; continue
if p[511] >= 2: p[511] += -2; p[611] += 1; continue
if p[512] >= 2: p[512] += -2; p[612] += 1; continue
if p[513] >= 2: p[513] += -2; p[613] += 1; continue
if p[514] >= 2: p[514] += -2; p[614] += 1; continue
if p[515] >= 2: p[515] += -2; p[615] += 1; continue
if p[516] >= 2: p[516] += -2; p[616] += 1; continue
if p[517] >= 2: p[517] += -2; p[617] += 1; continue
if p[518] >= 2: p[518] += -2; p[618] += 1; continue
if p[519] >= 2: p[519] += -2; p[619] += 1; continue
if p[520] >= 2: p[520] += -2; p[620] += 1; continue
if p[521] >= 2: p[521] += -2; p[621] += 1; continue
if p[522] >= 2: p[522] += -2; p[622] += 1; continue
if p[523] >= 2: p[523] += -2; p[623] += 1; continue
if p[524] >= 2: p[524] += -2; p[624] += 1; continue
if p[525] >= 2: p[525] += -2; p[625] += 1; continue
if p[526] >= 2: p[526] += -2; p[626] += 1; continue
if p[527] >= 2: p[527] += -2; p[627] += 1; continue
if p[528] >= 2: p[528] += -2; p[628] += 1; continue
if p[529] >= 2: p[529] += -2; p[629] += 1; continue
if p[530] >= 2: p[530] += -2; p[630] += 1; continue
if p[531] >= 2: p[531] += -2; p[631] += 1; continue
if p[532] >= 2: p[532] += -2; p[632] += 1; continue
if p[533] >= 2: p[533] += -2; p[633] += 1; continue
if p[534] >= 2: p[534] += -2; p[634] += 1; continue
if p[535] >= 2: p[535] += -2; p[635] += 1; continue
if p[536] >= 2: p[536] += -2; p[636] += 1; continue
if p[537] >= 2: p[537] += -2; p[637] += 1; continue
if p[538] >= 2: p[538] += -2; p[638] += 1; continue
if p[539] >= 2: p[539] += -2; p[639] += 1; continue
if p[540] >= 2: p[540] += -2; p[640] += 1; continue
if p[541] >= 2: p[541] += -2; p[641] += 1; continue
if p[542] >= 2: p[542] += -2; p[642] += 1; continue
if p[543] >= 2: p[543] += -2; p[643] += 1; continue
if p[544] >= 2: p[544] += -2; p[644] += 1; continue
if p[545] >= 2: p[545] += -2; p[645] += 1; continue
if p[546] >= 2: p[546] += -2; p[646] += 1; continue
if p[547] >= 2: p[547] += -2; p[647] += 1; continue
if p[548] >= 2: p[548] += -2; p[648] += 1; continue
if p[549] >= 2: p[549] += -2; p[649] += 1; continue
if p[550] >= 2: p[550] += -2; p[650] += 1; continue
if p[551] >= 2: p[551] += -2; p[651] += 1; continue
if p[552] >= 2: p[552] += -2; p[652] += 1; continue
if p[553] >= 2: p[553] += -2; p[653] += 1; continue
if p[554] >= 2: p[554] += -2; p[654] += 1; continue
if p[555] >= 2: p[555] += -2; p[655] += 1; continue
if p[556] >= 2: p[556] += -2; p[656] += 1; continue
if p[557] >= 2: p[557] += -2; p[657] += 1; continue
if p[558] >= 2: p[558] += -2; p[658] += 1; continue
if p[559] >= 2: p[559] += -2; p[659] += 1; continue
if p[560] >= 2: p[560] += -2; p[660] += 1; continue
if p[561] >= 2: p[561] += -2; p[661] += 1; continue
if p[562] >= 2: p[562] += -2; p[662] += 1; continue
if p[563] >= 2: p[563] += -2; p[663] += 1; continue
if p[564] >= 2: p[564] += -2; p[664] += 1; continue
if p[565] >= 2: p[565] += -2; p[665] += 1; continue
if p[566] >= 2: p[566] += -2; p[666] += 1; continue
if p[567] >= 2: p[567] += -2; p[667] += 1; continue
if p[568] >= 2: p[568] += -2; p[668] += 1; continue
if p[569] >= 2: p[569] += -2; p[669] += 1; continue
if p[570] >= 2: p[570] += -2; p[670] += 1; continue
if p[571] >= 2: p[571] += -2; p[671] += 1; continue
if p[572] >= 2: p[572] += -2; p[672] += 1; continue
if p[573] >= 2: p[573] += -2; p[673] += 1; continue
if p[574] >= 2: p[574] += -2; p[674] += 1; continue
if p[575] >= 2: p[575] += -2; p[675] += 1; continue
if p[576] >= 2: p[576] += -2; p[676] += 1; continue
if p[577] >= 2: p[577] += -2; p[677] += 1; continue
if p[578] >= 2: p[578] += -2; p[678] += 1; continue
if p[579] >= 2: p[579] += -2; p[679] += 1; continue
if p[580] >= 2: p[580] += -2; p[680] += 1; continue
if p[581] >= 2: p[581] += -2; p[681] += 1; continue
if p[582] >= 2: p[582] += -2; p[682] += 1; continue
if p[583] >= 2: p[583] += -2; p[683] += 1; continue
if p[584] >= 2: p[584] += -2; p[684] += 1; continue
if p[585] >= 2: p[585] += -2; p[685] += 1; continue
if p[586] >= 2: p[586] += -2; p[686] += 1; continue
if p[587] >= 2: p[587] += -2; p[687] += 1; continue
if p[588] >= 2: p[588] += -2; p[688] += 1; continue
if p[589] >= 2: p[589] += -2; p[689] += 1; continue
if p[590] >= 2: p[590] += -2; p[690] += 1; continue
if p[591] >= 2: p[591] += -2; p[691] += 1; continue
if p[592] >= 2: p[592] += -2; p[692] += 1; continue
if p[593] >= 2: p[593] += -2; p[693] += 1; continue
if p[594] >= 2: p[594] += -2; p[694] += 1; continue
if p[595] >= 2: p[595] += -2; p[695] += 1; continue
if p[596] >= 2: p[596] += -2; p[696] += 1; continue
if p[597] >= 2: p[597] += -2; p[697] += 1; continue
if p[598] >= 2: p[598] += -2; p[698] += 1; continue
if p[599] >= 2: p[599] += -2; p[699] += 1; continue
if p[600] >= 2: p[600] += -2; p[700] += 1; continue
if p[601] >= 2: p[601] += -2; p[701] += 1; continue
if p[602] >= 2: p[602] += -2; p[702] += 1; continue
if p[603] >= 2: p[603] += -2; p[703] += 1; continue
if p[604] >= 2: p[604] += -2; p[704] += 1; continue
if p[605] >= 2: p[605] += -2; p[705] += 1; continue
if p[606] >= 2: p[606] += -2; p[706] += 1; continue
if p[607] >= 2: p[607] += -2; p[707] += 1; continue
if p[608] >= 2: p[608] += -2; p[708] += 1; continue
if p[609] >= 2: p[609] += -2; p[709] += 1; continue
if p[610] >= 2: p[610] += -2; p[710] += 1; continue
if p[611] >= 2: p[611] += -2; p[711] += 1; continue
if p[612] >= 2: p[612] += -2; p[712] += 1; continue
if p[613] >= 2: p[613] += -2; p[713] += 1; continue
if p[614] >= 2: p[614] += -2; p[714] += 1; continue
if p[615] >= 2: p[615] += -2; p[715] += 1; continue
if p[616] >= 2: p[616] += -2; p[716] += 1; continue
if p[617] >= 2: p[617] += -2; p[717] += 1; continue
if p[618] >= 2: p[618] += -2; p[718] += 1; continue
if p[619] >= 2: p[619] += -2; p[719] += 1; continue
if p[620] >= 2: p[620] += -2; p[720] += 1; continue
if p[621] >= 2: p[621] += -2; p[721] += 1; continue
if p[622] >= 2: p[622] += -2; p[722] += 1; continue
if p[623] >= 2: p[623] += -2; p[723] += 1; continue
if p[624] >= 2: p[624] += -2; p[724] += 1; continue
if p[625] >= 2: p[625] += -2; p[725] += 1; continue
if p[626] >= 2: p[626] += -2; p[726] += 1; continue
if p[627] >= 2: p[627] += -2; p[727] += 1; continue
if p[628] >= 2: p[628] += -2; p[728] += 1; continue
if p[629] >= 2: p[629] += -2; p[729] += 1; continue
if p[630] >= 2: p[630] += -2; p[730] += 1; continue
if p[631] >= 2: p[631] += -2; p[731] += 1; continue
if p[632] >= 2: p[632] += -2; p[732] += 1; continue
if p[633] >= 2: p[633] += -2; p[733] += 1; continue
if p[634] >= 2: p[634] += -2; p[734] += 1; continue
if p[635] >= 2: p[635] += -2; p[735] += 1; continue
if p[636] >= 2: p[636] += -2; p[736] += 1; continue
if p[637] >= 2: p[637] += -2; p[737] += 1; continue
if p[638] >= 2: p[638] += -2; p[738] += 1; continue
if p[639] >= 2: p[639] += -2; p[739] += 1; continue
if p[640] >= 2: p[640] += -2; p[740] += 1; continue
if p[641] >= 2: p[641] += -2; p[741] += 1; continue
if p[642] >= 2: p[642] += -2; p[742] += 1; continue
if p[643] >= 2: p[643] += -2; p[743] += 1; continue
if p[644] >= 2: p[644] += -2; p[744] += 1; continue
if p[645] >= 2: p[645] += -2; p[745] += 1; continue
if p[646] >= 2: p[646] += -2; p[746] += 1; continue
if p[647] >= 2: p[647] += -2; p[747] += 1; continue
if p[648] >= 2: p[648] += -2; p[748] += 1; continue
if p[649] >= 2: p[649] += -2; p[749] += 1; continue
if p[650] >= 2: p[650] += -2; p[750] += 1; continue
if p[651] >= 2: p[651] += -2; p[751] += 1; continue
if p[652] >= 2: p[652] += -2; p[752] += 1; continue
if p[653] >= 2: p[653] += -2; p[753] += 1; continue
if p[654] >= 2: p[654] += -2; p[754] += 1; continue
if p[655] >= 2: p[655] += -2; p[755] += 1; continue
if p[656] >= 2: p[656] += -2; p[756] += 1; continue
if p[657] >= 2: p[657] += -2; p[757] += 1; continue
if p[658] >= 2: p[658] += -2; p[758] += 1; continue
if p[659] >= 2: p[659] += -2; p[759] += 1; continue
if p[660] >= 2: p[660] += -2; p[760] += 1; continue
if p[661] >= 2: p[661] += -2; p[761] += 1; continue
if p[662] >= 2: p[662] += -2; p[762] += 1; continue
if p[663] >= 2: p[663] += -2; p[763] += 1; continue
if p[664] >= 2: p[664] += -2; p[764] += 1; continue
if p[665] >= 2: p[665] += -2; p[765] += 1; continue
if p[666] >= 2: p[666] += -2; p[766] += 1; continue
if p[667] >= 2: p[667] += -2; p[767] += 1; continue
if p[668] >= 2: p[668] += -2; p[768] += 1; continue
if p[669] >= 2: p[669] += -2; p[769] += 1; continue
if p[670] >= 2: p[670] += -2; p[770] += 1; continue
if p[671] >= 2: p[671] += -2; p[771] += 1; continue
if p[672] >= 2: p[672] += -2; p[772] += 1; continue
if p[673] >= 2: p[673] += -2; p[773] += 1; continue
if p[674] >= 2: p[674] += -2; p[774] += 1; continue
if p[675] >= 2: p[675] += -2; p[775] += 1; continue
if p[676] >= 2: p[676] += -2; p[776] += 1; continue
if p[677] >= 2: p[677] += -2; p[777] += 1; continue
if p[678] >= 2: p[678] += -2; p[778] += 1; continue
if p[679] >= 2: p[679] += -2; p[779] += 1; continue
if p[680] >= 2: p[680] += -2; p[780] += 1; continue
if p[681] >= 2: p[681] += -2; p[781] += 1; continue
if p[682] >= 2: p[682] += -2; p[782] += 1; continue
if p[683] >= 2: p[683] += -2; p[783] += 1; continue
if p[684] >= 2: p[684] += -2; p[784] += 1; continue
if p[685] >= 2: p[685] += -2; p[785] += 1; continue
if p[686] >= 2: p[686] += -2; p[786] += 1; continue
if p[687] >= 2: p[687] += -2; p[787] += 1; continue
if p[688] >= 2: p[688] += -2; p[788] += 1; continue
if p[689] >= 2: p[689] += -2; p[789] += 1; continue
if p[690] >= 2: p[690] += -2; p[790] += 1; continue
if p[691] >= 2: p[691] += -2; p[791] += 1; continue
if p[692] >= 2: p[692] += -2; p[792] += 1; continue
if p[693] >= 2: p[693] += -2; p[793] += 1; continue
if p[694] >= 2: p[694] += -2; p[794] += 1; continue
if p[695] >= 2: p[695] += -2; p[795] += 1; continue
if p[696] >= 2: p[696] += -2; p[796] += 1; continue
if p[697] >= 2: p[697] += -2; p[797] += 1; continue
if p[698] >= 2: p[698] += -2; p[798] += 1; continue
if p[699] >= 2: p[699] += -2; p[799] += 1; continue
if p[700] >= 2: p[700] += -2; p[800] += 1; continue
if p[701] >= 2: p[701] += -2; p[801] += 1; continue
if p[1] >= 1: p[1] += -1; p[802] += 1; continue
if p[802] >= 1: p[802] += -1; p[803] += 1; continue
if p[262] >= 1 and p[803] >= 1: p[262] += -1; p[803] += -1; p[804] += 1; continue
if p[449] >= 1 and p[804] >= 1: p[449] += -1; p[804] += -1; p[805] += 1; continue
if p[805] >= 1: p[805] += -1; p[806] += 1; continue
if p[806] >= 1: p[806] += -1; p[807] += 1; continue
if p[807] >= 1: p[807] += -1; p[808] += 1; continue
if p[808] >= 1: p[808] += -1; p[809] += 1; continue
if p[316] >= 1 and p[809] >= 1: p[316] += -1; p[809] += -1; p[810] += 1; continue
if p[810] >= 1: p[810] += -1; p[811] += 1; continue
if p[616] >= 1 and p[811] >= 1: p[616] += -1; p[811] += -1; p[812] += 1; continue
if p[812] >= 1: p[812] += -1; p[813] += 1; continue
if p[660] >= 1 and p[813] >= 1: p[660] += -1; p[813] += -1; p[814] += 1; continue
if p[814] >= 1: p[814] += -1; p[815] += 1; continue
if p[508] >= 1 and p[815] >= 1: p[508] += -1; p[815] += -1; p[816] += 1; continue
if p[62] >= 1 and p[816] >= 1: p[62] += -1; p[816] += -1; p[817] += 1; continue
if p[817] >= 1: p[817] += -1; p[818] += 1; continue
if p[818] >= 1: p[818] += -1; p[819] += 1; continue
if p[819] >= 1: p[819] += -1; p[820] += 1; continue
if p[632] >= 1 and p[820] >= 1: p[632] += -1; p[820] += -1; p[821] += 1; continue
if p[821] >= 1: p[821] += -1; p[822] += 1; continue
if p[822] >= 1: p[822] += -1; p[823] += 1; continue
if p[506] >= 1 and p[823] >= 1: p[506] += -1; p[823] += -1; p[824] += 1; continue
if p[824] >= 1: p[824] += -1; p[825] += 1; continue
if p[825] >= 1: p[825] += -1; p[826] += 1; continue
if p[826] >= 1: p[826] += -1; p[827] += 1; continue
if p[827] >= 1: p[827] += -1; p[828] += 1; continue
if p[828] >= 1: p[828] += -1; p[829] += 1; continue
if p[622] >= 1 and p[829] >= 1: p[622] += -1; p[829] += -1; p[830] += 1; continue
if p[43] >= 1 and p[830] >= 1: p[43] += -1; p[830] += -1; p[831] += 1; continue
if p[258] >= 1 and p[831] >= 1: p[258] += -1; p[831] += -1; p[832] += 1; continue
if p[832] >= 1: p[832] += -1; p[833] += 1; continue
if p[833] >= 1: p[833] += -1; p[834] += 1; continue
if p[834] >= 1: p[834] += -1; p[835] += 1; continue
if p[835] >= 1: p[835] += -1; p[836] += 1; continue
if p[836] >= 1: p[836] += -1; p[837] += 1; continue
if p[837] >= 1: p[837] += -1; p[838] += 1; continue
if p[610] >= 1 and p[838] >= 1: p[610] += -1; p[838] += -1; p[839] += 1; continue
if p[839] >= 1: p[839] += -1; p[840] += 1; continue
if p[48] >= 1 and p[840] >= 1: p[48] += -1; p[840] += -1; p[841] += 1; continue
if p[841] >= 1: p[841] += -1; p[842] += 1; continue
if p[842] >= 1: p[842] += -1; p[843] += 1; continue
if p[843] >= 1: p[843] += -1; p[844] += 1; continue
if p[844] >= 1: p[844] += -1; p[845] += 1; continue
if p[238] >= 1 and p[845] >= 1: p[238] += -1; p[845] += -1; p[846] += 1; continue
if p[437] >= 1 and p[846] >= 1: p[437] += -1; p[846] += -1; p[847] += 1; continue
if p[847] >= 1: p[847] += -1; p[848] += 1; continue
if p[848] >= 1: p[848] += -1; p[849] += 1; continue
if p[849] >= 1: p[849] += -1; p[850] += 1; continue
if p[850] >= 1: p[850] += -1; p[851] += 1; continue
if p[851] >= 1: p[851] += -1; p[852] += 1; continue
if p[852] >= 1: p[852] += -1; p[853] += 1; continue
if p[853] >= 1: p[853] += -1; p[854] += 1; continue
if p[854] >= 1: p[854] += -1; p[855] += 1; continue
if p[627] >= 1 and p[855] >= 1: p[627] += -1; p[855] += -1; p[856] += 1; continue
if p[239] >= 1 and p[856] >= 1: p[239] += -1; p[856] += -1; p[857] += 1; continue
if p[454] >= 1 and p[857] >= 1: p[454] += -1; p[857] += -1; p[858] += 1; continue
if p[858] >= 1: p[858] += -1; p[859] += 1; continue
if p[619] >= 1 and p[859] >= 1: p[619] += -1; p[859] += -1; p[860] += 1; continue
if p[442] >= 1 and p[860] >= 1: p[442] += -1; p[860] += -1; p[861] += 1; continue
if p[153] >= 1 and p[861] >= 1: p[153] += -1; p[861] += -1; p[862] += 1; continue
if p[38] >= 1 and p[862] >= 1: p[38] += -1; p[862] += -1; p[863] += 1; continue
if p[863] >= 1: p[863] += -1; p[864] += 1; continue
if p[504] >= 1 and p[864] >= 1: p[504] += -1; p[864] += -1; p[865] += 1; continue
if p[865] >= 1: p[865] += -1; p[866] += 1; continue
if p[866] >= 1: p[866] += -1; p[867] += 1; continue
if p[867] >= 1: p[867] += -1; p[868] += 1; continue
if p[52] >= 1 and p[868] >= 1: p[52] += -1; p[868] += -1; p[869] += 1; continue
if p[522] >= 1 and p[869] >= 1: p[522] += -1; p[869] += -1; p[870] += 1; continue
if p[157] >= 1 and p[870] >= 1: p[157] += -1; p[870] += -1; p[871] += 1; continue
if p[14] >= 1 and p[871] >= 1: p[14] += -1; p[871] += -1; p[872] += 1; continue
if p[151] >= 1 and p[872] >= 1: p[151] += -1; p[872] += -1; p[873] += 1; continue
if p[407] >= 1 and p[873] >= 1: p[407] += -1; p[873] += -1; p[874] += 1; continue
if p[874] >= 1: p[874] += -1; p[875] += 1; continue
if p[875] >= 1: p[875] += -1; p[876] += 1; continue
if p[876] >= 1: p[876] += -1; p[877] += 1; continue
if p[877] >= 1: p[877] += -1; p[878] += 1; continue
if p[878] >= 1: p[878] += -1; p[879] += 1; continue
if p[879] >= 1: p[879] += -1; p[880] += 1; continue
if p[880] >= 1: p[880] += -1; p[881] += 1; continue
if p[881] >= 1: p[881] += -1; p[882] += 1; continue
if p[882] >= 1: p[882] += -1; p[883] += 1; continue
if p[883] >= 1: p[883] += -1; p[884] += 1; continue
if p[884] >= 1: p[884] += -1; p[885] += 1; continue
if p[451] >= 1 and p[885] >= 1: p[451] += -1; p[885] += -1; p[886] += 1; continue
if p[886] >= 1: p[886] += -1; p[887] += 1; continue
if p[887] >= 1: p[887] += -1; p[888] += 1; continue
if p[361] >= 1 and p[888] >= 1: p[361] += -1; p[888] += -1; p[889] += 1; continue
if p[889] >= 1: p[889] += -1; p[890] += 1; continue
if p[509] >= 1 and p[890] >= 1: p[509] += -1; p[890] += -1; p[891] += 1; continue
if p[537] >= 1 and p[891] >= 1: p[537] += -1; p[891] += -1; p[892] += 1; continue
if p[892] >= 1: p[892] += -1; p[893] += 1; continue
if p[893] >= 1: p[893] += -1; p[894] += 1; continue
if p[894] >= 1: p[894] += -1; p[895] += 1; continue
if p[895] >= 1: p[895] += -1; p[896] += 1; continue
if p[896] >= 1: p[896] += -1; p[897] += 1; continue
if p[897] >= 1: p[897] += -1; p[898] += 1; continue
if p[898] >= 1: p[898] += -1; p[899] += 1; continue
if p[899] >= 1: p[899] += -1; p[900] += 1; continue
if p[900] >= 1: p[900] += -1; p[901] += 1; continue
if p[901] >= 1: p[901] += -1; p[902] += 1; continue
if p[214] >= 1 and p[902] >= 1: p[214] += -1; p[902] += -1; p[903] += 1; continue
if p[903] >= 1: p[903] += -1; p[904] += 1; continue
if p[904] >= 1: p[904] += -1; p[905] += 1; continue
if p[905] >= 1: p[905] += -1; p[906] += 1; continue
if p[631] >= 1 and p[906] >= 1: p[631] += -1; p[906] += -1; p[907] += 1; continue
if p[907] >= 1: p[907] += -1; p[908] += 1; continue
if p[908] >= 1: p[908] += -1; p[909] += 1; continue
if p[909] >= 1: p[909] += -1; p[910] += 1; continue
if p[910] >= 1: p[910] += -1; p[911] += 1; continue
if p[108] >= 1 and p[911] >= 1: p[108] += -1; p[911] += -1; p[912] += 1; continue
if p[912] >= 1: p[912] += -1; p[913] += 1; continue
if p[913] >= 1: p[913] += -1; p[914] += 1; continue
if p[518] >= 1 and p[914] >= 1: p[518] += -1; p[914] += -1; p[915] += 1; continue
if p[915] >= 1: p[915] += -1; p[916] += 1; continue
if p[916] >= 1: p[916] += -1; p[917] += 1; continue
if p[917] >= 1: p[917] += -1; p[918] += 1; continue
if p[918] >= 1: p[918] += -1; p[919] += 1; continue
if p[919] >= 1: p[919] += -1; p[920] += 1; continue
if p[920] >= 1: p[920] += -1; p[921] += 1; continue
if p[9] >= 1 and p[921] >= 1: p[9] += -1; p[921] += -1; p[922] += 1; continue
if p[338] >= 1 and p[922] >= 1: p[338] += -1; p[922] += -1; p[923] += 1; continue
if p[923] >= 1: p[923] += -1; p[924] += 1; continue
if p[40] >= 1 and p[924] >= 1: p[40] += -1; p[924] += -1; p[925] += 1; continue
if p[925] >= 1: p[925] += -1; p[926] += 1; continue
if p[445] >= 1 and p[926] >= 1: p[445] += -1; p[926] += -1; p[927] += 1; continue
if p[927] >= 1: p[927] += -1; p[928] += 1; continue
if p[928] >= 1: p[928] += -1; p[929] += 1; continue
if p[29] >= 1 and p[929] >= 1: p[29] += -1; p[929] += -1; p[930] += 1; continue
if p[930] >= 1: p[930] += -1; p[931] += 1; continue
if p[931] >= 1: p[931] += -1; p[932] += 1; continue
if p[932] >= 1: p[932] += -1; p[933] += 1; continue
if p[933] >= 1: p[933] += -1; p[934] += 1; continue
if p[934] >= 1: p[934] += -1; p[935] += 1; continue
if p[362] >= 1 and p[935] >= 1: p[362] += -1; p[935] += -1; p[936] += 1; continue
if p[936] >= 1: p[936] += -1; p[937] += 1; continue
if p[937] >= 1: p[937] += -1; p[938] += 1; continue
if p[938] >= 1: p[938] += -1; p[939] += 1; continue
if p[939] >= 1: p[939] += -1; p[940] += 1; continue
if p[940] >= 1: p[940] += -1; p[941] += 1; continue
if p[941] >= 1: p[941] += -1; p[942] += 1; continue
if p[942] >= 1: p[942] += -1; p[943] += 1; continue
if p[227] >= 1 and p[943] >= 1: p[227] += -1; p[943] += -1; p[944] += 1; continue
if p[944] >= 1: p[944] += -1; p[945] += 1; continue
if p[945] >= 1: p[945] += -1; p[946] += 1; continue
if p[11] >= 1 and p[946] >= 1: p[11] += -1; p[946] += -1; p[947] += 1; continue
if p[313] >= 1 and p[947] >= 1: p[313] += -1; p[947] += -1; p[948] += 1; continue
if p[319] >= 1 and p[948] >= 1: p[319] += -1; p[948] += -1; p[949] += 1; continue
if p[949] >= 1: p[949] += -1; p[950] += 1; continue
if p[545] >= 1 and p[950] >= 1: p[545] += -1; p[950] += -1; p[951] += 1; continue
if p[951] >= 1: p[951] += -1; p[952] += 1; continue
if p[647] >= 1 and p[952] >= 1: p[647] += -1; p[952] += -1; p[953] += 1; continue
if p[339] >= 1 and p[953] >= 1: p[339] += -1; p[953] += -1; p[954] += 1; continue
if p[520] >= 1 and p[954] >= 1: p[520] += -1; p[954] += -1; p[955] += 1; continue
if p[436] >= 1 and p[955] >= 1: p[436] += -1; p[955] += -1; p[956] += 1; continue
if p[956] >= 1: p[956] += -1; p[957] += 1; continue
if p[957] >= 1: p[957] += -1; p[958] += 1; continue
if p[958] >= 1: p[958] += -1; p[959] += 1; continue
if p[959] >= 1: p[959] += -1; p[960] += 1; continue
if p[960] >= 1: p[960] += -1; p[961] += 1; continue
if p[961] >= 1: p[961] += -1; p[962] += 1; continue
if p[514] >= 1 and p[962] >= 1: p[514] += -1; p[962] += -1; p[963] += 1; continue
if p[358] >= 1 and p[963] >= 1: p[358] += -1; p[963] += -1; p[964] += 1; continue
if p[964] >= 1: p[964] += -1; p[965] += 1; continue
if p[541] >= 1 and p[965] >= 1: p[541] += -1; p[965] += -1; p[966] += 1; continue
if p[966] >= 1: p[966] += -1; p[967] += 1; continue
if p[119] >= 1 and p[967] >= 1: p[119] += -1; p[967] += -1; p[968] += 1; continue
if p[968] >= 1: p[968] += -1; p[969] += 1; continue
if p[969] >= 1: p[969] += -1; p[970] += 1; continue
if p[4] >= 1 and p[970] >= 1: p[4] += -1; p[970] += -1; p[971] += 1; continue
if p[549] >= 1 and p[971] >= 1: p[549] += -1; p[971] += -1; p[972] += 1; continue
if p[559] >= 1 and p[972] >= 1: p[559] += -1; p[972] += -1; p[973] += 1; continue
if p[973] >= 1: p[973] += -1; p[974] += 1; continue
if p[974] >= 1: p[974] += -1; p[975] += 1; continue
if p[975] >= 1: p[975] += -1; p[976] += 1; continue
if p[513] >= 1 and p[976] >= 1: p[513] += -1; p[976] += -1; p[977] += 1; continue
if p[977] >= 1: p[977] += -1; p[978] += 1; continue
if p[978] >= 1: p[978] += -1; p[979] += 1; continue
if p[979] >= 1: p[979] += -1; p[980] += 1; continue
if p[250] >= 1 and p[980] >= 1: p[250] += -1; p[980] += -1; p[981] += 1; continue
if p[117] >= 1 and p[981] >= 1: p[117] += -1; p[981] += -1; p[982] += 1; continue
if p[982] >= 1: p[982] += -1; p[983] += 1; continue
if p[357] >= 1 and p[983] >= 1: p[357] += -1; p[983] += -1; p[984] += 1; continue
if p[984] >= 1: p[984] += -1; p[985] += 1; continue
if p[985] >= 1: p[985] += -1; p[986] += 1; continue
if p[986] >= 1: p[986] += -1; p[987] += 1; continue
if p[987] >= 1: p[987] += -1; p[988] += 1; continue
if p[988] >= 1: p[988] += -1; p[989] += 1; continue
if p[989] >= 1: p[989] += -1; p[990] += 1; continue
if p[990] >= 1: p[990] += -1; p[991] += 1; continue
if p[636] >= 1 and p[991] >= 1: p[636] += -1; p[991] += -1; p[992] += 1; continue
if p[152] >= 1 and p[992] >= 1: p[152] += -1; p[992] += -1; p[993] += 1; continue
if p[993] >= 1: p[993] += -1; p[994] += 1; continue
if p[994] >= 1: p[994] += -1; p[995] += 1; continue
if p[995] >= 1: p[995] += -1; p[996] += 1; continue
if p[996] >= 1: p[996] += -1; p[997] += 1; continue
if p[24] >= 1 and p[997] >= 1: p[24] += -1; p[997] += -1; p[998] += 1; continue
if p[998] >= 1: p[998] += -1; p[999] += 1; continue
if p[999] >= 1: p[999] += -1; p[1000] += 1; continue
if p[1000] >= 1: p[1000] += -1; p[1001] += 1; continue
if p[1001] >= 1: p[1001] += -1; p[1002] += 1; continue
if p[1002] >= 1: p[1002] += -1; p[1003] += 1; continue
if p[1003] >= 1: p[1003] += -1; p[1004] += 1; continue
if p[1004] >= 1: p[1004] += -1; p[1005] += 1; continue
if p[243] >= 1 and p[1005] >= 1: p[243] += -1; p[1005] += -1; p[1006] += 1; continue
if p[1006] >= 1: p[1006] += -1; p[1007] += 1; continue
if p[1007] >= 1: p[1007] += -1; p[1008] += 1; continue
if p[1008] >= 1: p[1008] += -1; p[1009] += 1; continue
if p[1009] >= 1: p[1009] += -1; p[1010] += 1; continue
if p[1010] >= 1: p[1010] += -1; p[1011] += 1; continue
if p[222] >= 1 and p[1011] >= 1: p[222] += -1; p[1011] += -1; p[1012] += 1; continue
if p[1012] >= 1: p[1012] += -1; p[1013] += 1; continue
if p[528] >= 1 and p[1013] >= 1: p[528] += -1; p[1013] += -1; p[1014] += 1; continue
if p[111] >= 1 and p[1014] >= 1: p[111] += -1; p[1014] += -1; p[1015] += 1; continue
if p[1015] >= 1: p[1015] += -1; p[1016] += 1; continue
if p[1016] >= 1: p[1016] += -1; p[1017] += 1; continue
if p[1017] >= 1: p[1017] += -1; p[1018] += 1; continue
if p[143] >= 1 and p[1018] >= 1: p[143] += -1; p[1018] += -1; p[1019] += 1; continue
if p[114] >= 1 and p[1019] >= 1: p[114] += -1; p[1019] += -1; p[1020] += 1; continue
if p[1020] >= 1: p[1020] += -1; p[1021] += 1; continue
if p[653] >= 1 and p[1021] >= 1: p[653] += -1; p[1021] += -1; p[1022] += 1; continue
if p[1022] >= 1: p[1022] += -1; p[1023] += 1; continue
if p[1023] >= 1: p[1023] += -1; p[1024] += 1; continue
if p[1024] >= 1: p[1024] += -1; p[1025] += 1; continue
if p[1025] >= 1: p[1025] += -1; p[1026] += 1; continue
if p[1026] >= 1: p[1026] += -1; p[1027] += 1; continue
if p[225] >= 1 and p[1027] >= 1: p[225] += -1; p[1027] += -1; p[1028] += 1; continue
if p[1028] >= 1: p[1028] += -1; p[1029] += 1; continue
if p[1029] >= 1: p[1029] += -1; p[1030] += 1; continue
if p[1030] >= 1: p[1030] += -1; p[1031] += 1; continue
if p[516] >= 1 and p[1031] >= 1: p[516] += -1; p[1031] += -1; p[1032] += 1; continue
if p[1032] >= 1: p[1032] += -1; p[1033] += 1; continue
if p[1033] >= 1: p[1033] += -1; p[1034] += 1; continue
if p[1034] >= 1: p[1034] += -1; p[1035] += 1; continue
if p[1035] >= 1: p[1035] += -1; p[1036] += 1; continue
if p[652] >= 1 and p[1036] >= 1: p[652] += -1; p[1036] += -1; p[1037] += 1; continue
if p[1037] >= 1: p[1037] += -1; p[1038] += 1; continue
if p[1038] >= 1: p[1038] += -1; p[1039] += 1; continue
if p[1039] >= 1: p[1039] += -1; p[1040] += 1; continue
if p[253] >= 1 and p[1040] >= 1: p[253] += -1; p[1040] += -1; p[1041] += 1; continue
if p[1041] >= 1: p[1041] += -1; p[1042] += 1; continue
if p[1042] >= 1: p[1042] += -1; p[1043] += 1; continue
if p[1043] >= 1: p[1043] += -1; p[1044] += 1; continue
if p[1044] >= 1: p[1044] += -1; p[1045] += 1; continue
if p[644] >= 1 and p[1045] >= 1: p[644] += -1; p[1045] += -1; p[1046] += 1; continue
if p[122] >= 1 and p[1046] >= 1: p[122] += -1; p[1046] += -1; p[1047] += 1; continue
if p[1047] >= 1: p[1047] += -1; p[1048] += 1; continue
if p[1048] >= 1: p[1048] += -1; p[1049] += 1; continue
if p[1049] >= 1: p[1049] += -1; p[1050] += 1; continue
if p[1050] >= 1: p[1050] += -1; p[1051] += 1; continue
if p[1051] >= 1: p[1051] += -1; p[1052] += 1; continue
if p[406] >= 1 and p[1052] >= 1: p[406] += -1; p[1052] += -1; p[1053] += 1; continue
if p[1053] >= 1: p[1053] += -1; p[1054] += 1; continue
if p[1054] >= 1: p[1054] += -1; p[1055] += 1; continue
if p[416] >= 1 and p[1055] >= 1: p[416] += -1; p[1055] += -1; p[1056] += 1; continue
if p[1056] >= 1: p[1056] += -1; p[1057] += 1; continue
if p[1057] >= 1: p[1057] += -1; p[1058] += 1; continue
if p[54] >= 1 and p[1058] >= 1: p[54] += -1; p[1058] += -1; p[1059] += 1; continue
if p[207] >= 1 and p[1059] >= 1: p[207] += -1; p[1059] += -1; p[1060] += 1; continue
if p[1060] >= 1: p[1060] += -1; p[1061] += 1; continue
if p[1061] >= 1: p[1061] += -1; p[1062] += 1; continue
if p[1062] >= 1: p[1062] += -1; p[1063] += 1; continue
if p[26] >= 1 and p[1063] >= 1: p[26] += -1; p[1063] += -1; p[1064] += 1; continue
if p[460] >= 1 and p[1064] >= 1: p[460] += -1; p[1064] += -1; p[1065] += 1; continue
if p[430] >= 1 and p[1065] >= 1: p[430] += -1; p[1065] += -1; p[1066] += 1; continue
if p[539] >= 1 and p[1066] >= 1: p[539] += -1; p[1066] += -1; p[1067] += 1; continue
if p[521] >= 1 and p[1067] >= 1: p[521] += -1; p[1067] += -1; p[1068] += 1; continue
if p[136] >= 1 and p[1068] >= 1: p[136] += -1; p[1068] += -1; p[1069] += 1; continue
if p[1069] >= 1: p[1069] += -1; p[1070] += 1; continue
if p[150] >= 1 and p[1070] >= 1: p[150] += -1; p[1070] += -1; p[1071] += 1; continue
if p[1071] >= 1: p[1071] += -1; p[1072] += 1; continue
if p[1072] >= 1: p[1072] += -1; p[1073] += 1; continue
if p[1073] >= 1: p[1073] += -1; p[1074] += 1; continue
if p[1074] >= 1: p[1074] += -1; p[1075] += 1; continue
if p[427] >= 1 and p[1075] >= 1: p[427] += -1; p[1075] += -1; p[1076] += 1; continue
if p[1076] >= 1: p[1076] += -1; p[1077] += 1; continue
if p[1077] >= 1: p[1077] += -1; p[1078] += 1; continue
if p[1078] >= 1: p[1078] += -1; p[1079] += 1; continue
if p[1079] >= 1: p[1079] += -1; p[1080] += 1; continue
if p[503] >= 1 and p[1080] >= 1: p[503] += -1; p[1080] += -1; p[1081] += 1; continue
if p[1081] >= 1: p[1081] += -1; p[1082] += 1; continue
if p[602] >= 1 and p[1082] >= 1: p[602] += -1; p[1082] += -1; p[1083] += 1; continue
if p[1083] >= 1: p[1083] += -1; p[1084] += 1; continue
if p[628] >= 1 and p[1084] >= 1: p[628] += -1; p[1084] += -1; p[1085] += 1; continue
if p[1085] >= 1: p[1085] += -1; p[1086] += 1; continue
if p[1086] >= 1: p[1086] += -1; p[1087] += 1; continue
if p[1087] >= 1: p[1087] += -1; p[1088] += 1; continue
if p[409] >= 1 and p[1088] >= 1: p[409] += -1; p[1088] += -1; p[1089] += 1; continue
if p[1089] >= 1: p[1089] += -1; p[1090] += 1; continue
if p[1090] >= 1: p[1090] += -1; p[1091] += 1; continue
if p[1091] >= 1: p[1091] += -1; p[1092] += 1; continue
if p[1092] >= 1: p[1092] += -1; p[1093] += 1; continue
if p[1093] >= 1: p[1093] += -1; p[1094] += 1; continue
if p[1094] >= 1: p[1094] += -1; p[1095] += 1; continue
if p[1095] >= 1: p[1095] += -1; p[1096] += 1; continue
if p[605] >= 1 and p[1096] >= 1: p[605] += -1; p[1096] += -1; p[1097] += 1; continue
if p[535] >= 1 and p[1097] >= 1: p[535] += -1; p[1097] += -1; p[1098] += 1; continue
if p[1098] >= 1: p[1098] += -1; p[1099] += 1; continue
if p[1099] >= 1: p[1099] += -1; p[1100] += 1; continue
if p[643] >= 1 and p[1100] >= 1: p[643] += -1; p[1100] += -1; p[1101] += 1; continue
if p[1101] >= 1: p[1101] += -1; p[1102] += 1; continue
if p[1102] >= 1: p[1102] += -1; p[1103] += 1; continue
if p[1103] >= 1: p[1103] += -1; p[1104] += 1; continue
if p[1104] >= 1: p[1104] += -1; p[1105] += 1; continue
if p[147] >= 1 and p[1105] >= 1: p[147] += -1; p[1105] += -1; p[1106] += 1; continue
if p[1106] >= 1: p[1106] += -1; p[1107] += 1; continue
if p[1107] >= 1: p[1107] += -1; p[1108] += 1; continue
if p[1108] >= 1: p[1108] += -1; p[1109] += 1; continue
if p[1109] >= 1: p[1109] += -1; p[1110] += 1; continue
if p[1110] >= 1: p[1110] += -1; p[1111] += 1; continue
if p[130] >= 1 and p[1111] >= 1: p[130] += -1; p[1111] += -1; p[1112] += 1; continue
if p[1112] >= 1: p[1112] += -1; p[1113] += 1; continue
if p[1113] >= 1: p[1113] += -1; p[1114] += 1; continue
if p[1114] >= 1: p[1114] += -1; p[1115] += 1; continue
if p[5] >= 1 and p[1115] >= 1: p[5] += -1; p[1115] += -1; p[1116] += 1; continue
if p[1116] >= 1: p[1116] += -1; p[1117] += 1; continue
if p[1117] >= 1: p[1117] += -1; p[1118] += 1; continue
if p[1118] >= 1: p[1118] += -1; p[1119] += 1; continue
if p[1119] >= 1: p[1119] += -1; p[1120] += 1; continue
if p[546] >= 1 and p[1120] >= 1: p[546] += -1; p[1120] += -1; p[1121] += 1; continue
if p[223] >= 1 and p[1121] >= 1: p[223] += -1; p[1121] += -1; p[1122] += 1; continue
if p[103] >= 1 and p[1122] >= 1: p[103] += -1; p[1122] += -1; p[1123] += 1; continue
if p[1123] >= 1: p[1123] += -1; p[1124] += 1; continue
if p[1124] >= 1: p[1124] += -1; p[1125] += 1; continue
if p[248] >= 1 and p[1125] >= 1: p[248] += -1; p[1125] += -1; p[1126] += 1; continue
if p[42] >= 1 and p[1126] >= 1: p[42] += -1; p[1126] += -1; p[1127] += 1; continue
if p[1127] >= 1: p[1127] += -1; p[1128] += 1; continue
if p[1128] >= 1: p[1128] += -1; p[1129] += 1; continue
if p[1129] >= 1: p[1129] += -1; p[1130] += 1; continue
if p[533] >= 1 and p[1130] >= 1: p[533] += -1; p[1130] += -1; p[1131] += 1; continue
if p[1131] >= 1: p[1131] += -1; p[1132] += 1; continue
if p[604] >= 1 and p[1132] >= 1: p[604] += -1; p[1132] += -1; p[1133] += 1; continue
if p[10] >= 1 and p[1133] >= 1: p[10] += -1; p[1133] += -1; p[1134] += 1; continue
if p[126] >= 1 and p[1134] >= 1: p[126] += -1; p[1134] += -1; p[1135] += 1; continue
if p[617] >= 1 and p[1135] >= 1: p[617] += -1; p[1135] += -1; p[1136] += 1; continue
if p[1136] >= 1: p[1136] += -1; p[1137] += 1; continue
if p[448] >= 1 and p[1137] >= 1: p[448] += -1; p[1137] += -1; p[1138] += 1; continue
if p[1138] >= 1: p[1138] += -1; p[1139] += 1; continue
if p[1139] >= 1: p[1139] += -1; p[1140] += 1; continue
if p[429] >= 1 and p[1140] >= 1: p[429] += -1; p[1140] += -1; p[1141] += 1; continue
if p[1141] >= 1: p[1141] += -1; p[1142] += 1; continue
if p[1142] >= 1: p[1142] += -1; p[1143] += 1; continue
if p[1143] >= 1: p[1143] += -1; p[1144] += 1; continue
if p[1144] >= 1: p[1144] += -1; p[1145] += 1; continue
if p[1145] >= 1: p[1145] += -1; p[1146] += 1; continue
if p[1146] >= 1: p[1146] += -1; p[1147] += 1; continue
if p[633] >= 1 and p[1147] >= 1: p[633] += -1; p[1147] += -1; p[1148] += 1; continue
if p[1148] >= 1: p[1148] += -1; p[1149] += 1; continue
if p[1149] >= 1: p[1149] += -1; p[1150] += 1; continue
if p[1150] >= 1: p[1150] += -1; p[1151] += 1; continue
if p[1151] >= 1: p[1151] += -1; p[1152] += 1; continue
if p[1152] >= 1: p[1152] += -1; p[1153] += 1; continue
if p[3] >= 1 and p[1153] >= 1: p[3] += -1; p[1153] += -1; p[1154] += 1; continue
if p[1154] >= 1: p[1154] += -1; p[1155] += 1; continue
if p[1155] >= 1: p[1155] += -1; p[1156] += 1; continue
if p[1156] >= 1: p[1156] += -1; p[1157] += 1; continue
if p[1157] >= 1: p[1157] += -1; p[1158] += 1; continue
if p[1158] >= 1: p[1158] += -1; p[1159] += 1; continue
if p[1159] >= 1: p[1159] += -1; p[1160] += 1; continue
if p[1160] >= 1: p[1160] += -1; p[1161] += 1; continue
if p[1161] >= 1: p[1161] += -1; p[1162] += 1; continue
if p[1162] >= 1: p[1162] += -1; p[1163] += 1; continue
if p[607] >= 1 and p[1163] >= 1: p[607] += -1; p[1163] += -1; p[1164] += 1; continue
if p[1164] >= 1: p[1164] += -1; p[1165] += 1; continue
if p[1165] >= 1: p[1165] += -1; p[1166] += 1; continue
if p[1166] >= 1: p[1166] += -1; p[1167] += 1; continue
if p[420] >= 1 and p[1167] >= 1: p[420] += -1; p[1167] += -1; p[1168] += 1; continue
if p[1168] >= 1: p[1168] += -1; p[1169] += 1; continue
if p[303] >= 1 and p[1169] >= 1: p[303] += -1; p[1169] += -1; p[1170] += 1; continue
if p[538] >= 1 and p[1170] >= 1: p[538] += -1; p[1170] += -1; p[1171] += 1; continue
if p[1171] >= 1: p[1171] += -1; p[1172] += 1; continue
if p[1172] >= 1: p[1172] += -1; p[1173] += 1; continue
if p[1173] >= 1: p[1173] += -1; p[1174] += 1; continue
if p[1174] >= 1: p[1174] += -1; p[1175] += 1; continue
if p[534] >= 1 and p[1175] >= 1: p[534] += -1; p[1175] += -1; p[1176] += 1; continue
if p[638] >= 1 and p[1176] >= 1: p[638] += -1; p[1176] += -1; p[1177] += 1; continue
if p[625] >= 1 and p[1177] >= 1: p[625] += -1; p[1177] += -1; p[1178] += 1; continue
if p[1178] >= 1: p[1178] += -1; p[1179] += 1; continue
if p[635] >= 1 and p[1179] >= 1: p[635] += -1; p[1179] += -1; p[1180] += 1; continue
if p[213] >= 1 and p[1180] >= 1: p[213] += -1; p[1180] += -1; p[1181] += 1; continue
if p[462] >= 1 and p[1181] >= 1: p[462] += -1; p[1181] += -1; p[1182] += 1; continue
if p[1182] >= 1: p[1182] += -1; p[1183] += 1; continue
if p[1183] >= 1: p[1183] += -1; p[1184] += 1; continue
if p[1184] >= 1: p[1184] += -1; p[1185] += 1; continue
if p[1185] >= 1: p[1185] += -1; p[1186] += 1; continue
if p[249] >= 1 and p[1186] >= 1: p[249] += -1; p[1186] += -1; p[1187] += 1; continue
if p[554] >= 1 and p[1187] >= 1: p[554] += -1; p[1187] += -1; p[1188] += 1; continue
if p[1188] >= 1: p[1188] += -1; p[1189] += 1; continue
if p[1189] >= 1: p[1189] += -1; p[1190] += 1; continue
if p[1190] >= 1: p[1190] += -1; p[1191] += 1; continue
if p[1191] >= 1: p[1191] += -1; p[1192] += 1; continue
if p[626] >= 1 and p[1192] >= 1: p[626] += -1; p[1192] += -1; p[1193] += 1; continue
if p[1193] >= 1: p[1193] += -1; p[1194] += 1; continue
if p[1194] >= 1: p[1194] += -1; p[1195] += 1; continue
if p[31] >= 1 and p[1195] >= 1: p[31] += -1; p[1195] += -1; p[1196] += 1; continue
if p[1196] >= 1: p[1196] += -1; p[1197] += 1; continue
if p[548] >= 1 and p[1197] >= 1: p[548] += -1; p[1197] += -1; p[1198] += 1; continue
if p[1198] >= 1: p[1198] += -1; p[1199] += 1; continue
if p[614] >= 1 and p[1199] >= 1: p[614] += -1; p[1199] += -1; p[1200] += 1; continue
if p[1200] >= 1: p[1200] += -1; p[1201] += 1; continue
if p[1201] >= 1: p[1201] += -1; p[1202] += 1; continue
if p[433] >= 1 and p[1202] >= 1: p[433] += -1; p[1202] += -1; p[1203] += 1; continue
if p[1203] >= 1: p[1203] += -1; p[1204] += 1; continue
if p[1204] >= 1: p[1204] += -1; p[1205] += 1; continue
if p[511] >= 1 and p[1205] >= 1: p[511] += -1; p[1205] += -1; p[1206] += 1; continue
if p[1206] >= 1: p[1206] += -1; p[1207] += 1; continue
if p[421] >= 1 and p[1207] >= 1: p[421] += -1; p[1207] += -1; p[1208] += 1; continue
if p[257] >= 1 and p[1208] >= 1: p[257] += -1; p[1208] += -1; p[1209] += 1; continue
if p[252] >= 1 and p[1209] >= 1: p[252] += -1; p[1209] += -1; p[1210] += 1; continue
if p[1210] >= 1: p[1210] += -1; p[1211] += 1; continue
if p[246] >= 1 and p[1211] >= 1: p[246] += -1; p[1211] += -1; p[1212] += 1; continue
if p[1212] >= 1: p[1212] += -1; p[1213] += 1; continue
if p[417] >= 1 and p[1213] >= 1: p[417] += -1; p[1213] += -1; p[1214] += 1; continue
if p[1214] >= 1: p[1214] += -1; p[1215] += 1; continue
if p[1215] >= 1: p[1215] += -1; p[1216] += 1; continue
if p[1216] >= 1: p[1216] += -1; p[1217] += 1; continue
if p[342] >= 1 and p[1217] >= 1: p[342] += -1; p[1217] += -1; p[1218] += 1; continue
if p[1218] >= 1: p[1218] += -1; p[1219] += 1; continue
if p[113] >= 1 and p[1219] >= 1: p[113] += -1; p[1219] += -1; p[1220] += 1; continue
if p[1220] >= 1: p[1220] += -1; p[1221] += 1; continue
if p[1221] >= 1: p[1221] += -1; p[1222] += 1; continue
if p[255] >= 1 and p[1222] >= 1: p[255] += -1; p[1222] += -1; p[1223] += 1; continue
if p[547] >= 1 and p[1223] >= 1: p[547] += -1; p[1223] += -1; p[1224] += 1; continue
if p[1224] >= 1: p[1224] += -1; p[1225] += 1; continue
if p[1225] >= 1: p[1225] += -1; p[1226] += 1; continue
if p[1226] >= 1: p[1226] += -1; p[1227] += 1; continue
if p[1227] >= 1: p[1227] += -1; p[1228] += 1; continue
if p[544] >= 1 and p[1228] >= 1: p[544] += -1; p[1228] += -1; p[1229] += 1; continue
if p[536] >= 1 and p[1229] >= 1: p[536] += -1; p[1229] += -1; p[1230] += 1; continue
if p[1230] >= 1: p[1230] += -1; p[1231] += 1; continue
if p[1231] >= 1: p[1231] += -1; p[1232] += 1; continue
if p[560] >= 1 and p[1232] >= 1: p[560] += -1; p[1232] += -1; p[1233] += 1; continue
if p[1233] >= 1: p[1233] += -1; p[1234] += 1; continue
if p[443] >= 1 and p[1234] >= 1: p[443] += -1; p[1234] += -1; p[1235] += 1; continue
if p[1235] >= 1: p[1235] += -1; p[1236] += 1; continue
if p[1236] >= 1: p[1236] += -1; p[1237] += 1; continue
if p[502] >= 1 and p[1237] >= 1: p[502] += -1; p[1237] += -1; p[1238] += 1; continue
if p[1238] >= 1: p[1238] += -1; p[1239] += 1; continue
if p[328] >= 1 and p[1239] >= 1: p[328] += -1; p[1239] += -1; p[1240] += 1; continue
if p[434] >= 1 and p[1240] >= 1: p[434] += -1; p[1240] += -1; p[1241] += 1; continue
if p[1241] >= 1: p[1241] += -1; p[1242] += 1; continue
if p[1242] >= 1: p[1242] += -1; p[1243] += 1; continue
if p[1243] >= 1: p[1243] += -1; p[1244] += 1; continue
if p[641] >= 1 and p[1244] >= 1: p[641] += -1; p[1244] += -1; p[1245] += 1; continue
if p[415] >= 1 and p[1245] >= 1: p[415] += -1; p[1245] += -1; p[1246] += 1; continue
if p[1246] >= 1: p[1246] += -1; p[1247] += 1; continue
if p[1247] >= 1: p[1247] += -1; p[1248] += 1; continue
if p[527] >= 1 and p[1248] >= 1: p[527] += -1; p[1248] += -1; p[1249] += 1; continue
if p[1249] >= 1: p[1249] += -1; p[1250] += 1; continue
if p[1250] >= 1: p[1250] += -1; p[1251] += 1; continue
if p[551] >= 1 and p[1251] >= 1: p[551] += -1; p[1251] += -1; p[1252] += 1; continue
if p[146] >= 1 and p[1252] >= 1: p[146] += -1; p[1252] += -1; p[1253] += 1; continue
if p[1253] >= 1: p[1253] += -1; p[1254] += 1; continue
if p[343] >= 1 and p[1254] >= 1: p[343] += -1; p[1254] += -1; p[1255] += 1; continue
if p[51] >= 1 and p[1255] >= 1: p[51] += -1; p[1255] += -1; p[1256] += 1; continue
if p[1256] >= 1: p[1256] += -1; p[1257] += 1; continue
if p[356] >= 1 and p[1257] >= 1: p[356] += -1; p[1257] += -1; p[1258] += 1; continue
if p[561] >= 1 and p[1258] >= 1: p[561] += -1; p[1258] += -1; p[1259] += 1; continue
if p[1259] >= 1: p[1259] += -1; p[1260] += 1; continue
if p[1260] >= 1: p[1260] += -1; p[1261] += 1; continue
if p[1261] >= 1: p[1261] += -1; p[1262] += 1; continue
if p[1262] >= 1: p[1262] += -1; p[1263] += 1; continue
if p[1263] >= 1: p[1263] += -1; p[1264] += 1; continue
if p[1264] >= 1: p[1264] += -1; p[1265] += 1; continue
if p[1265] >= 1: p[1265] += -1; p[1266] += 1; continue
if p[1266] >= 1: p[1266] += -1; p[1267] += 1; continue
if p[344] >= 1 and p[1267] >= 1: p[344] += -1; p[1267] += -1; p[1268] += 1; continue
if p[1268] >= 1: p[1268] += -1; p[1269] += 1; continue
if p[553] >= 1 and p[1269] >= 1: p[553] += -1; p[1269] += -1; p[1270] += 1; continue
if p[58] >= 1 and p[1270] >= 1: p[58] += -1; p[1270] += -1; p[1271] += 1; continue
if p[1271] >= 1: p[1271] += -1; p[1272] += 1; continue
if p[1272] >= 1: p[1272] += -1; p[1273] += 1; continue
if p[1273] >= 1: p[1273] += -1; p[1274] += 1; continue
if p[1274] >= 1: p[1274] += -1; p[1275] += 1; continue
if p[1275] >= 1: p[1275] += -1; p[1276] += 1; continue
if p[1276] >= 1: p[1276] += -1; p[1277] += 1; continue
if p[1277] >= 1: p[1277] += -1; p[1278] += 1; continue
if p[1278] >= 1: p[1278] += -1; p[1279] += 1; continue
if p[1279] >= 1: p[1279] += -1; p[1280] += 1; continue
if p[1280] >= 1: p[1280] += -1; p[1281] += 1; continue
if p[1281] >= 1: p[1281] += -1; p[1282] += 1; continue
if p[1282] >= 1: p[1282] += -1; p[1283] += 1; continue
if p[1283] >= 1: p[1283] += -1; p[1284] += 1; continue
if p[35] >= 1 and p[1284] >= 1: p[35] += -1; p[1284] += -1; p[1285] += 1; continue
if p[1285] >= 1: p[1285] += -1; p[1286] += 1; continue
if p[1286] >= 1: p[1286] += -1; p[1287] += 1; continue
if p[1287] >= 1: p[1287] += -1; p[1288] += 1; continue
if p[1288] >= 1: p[1288] += -1; p[1289] += 1; continue
if p[1289] >= 1: p[1289] += -1; p[1290] += 1; continue
if p[1290] >= 1: p[1290] += -1; p[1291] += 1; continue
if p[1291] >= 1: p[1291] += -1; p[1292] += 1; continue
if p[1292] >= 1: p[1292] += -1; p[1293] += 1; continue
if p[655] >= 1 and p[1293] >= 1: p[655] += -1; p[1293] += -1; p[1294] += 1; continue
if p[650] >= 1 and p[1294] >= 1: p[650] += -1; p[1294] += -1; p[1295] += 1; continue
if p[1295] >= 1: p[1295] += -1; p[1296] += 1; continue
if p[1296] >= 1: p[1296] += -1; p[1297] += 1; continue
if p[1297] >= 1: p[1297] += -1; p[1298] += 1; continue
if p[1298] >= 1: p[1298] += -1; p[1299] += 1; continue
if p[1299] >= 1: p[1299] += -1; p[1300] += 1; continue
if p[310] >= 1 and p[1300] >= 1: p[310] += -1; p[1300] += -1; p[1301] += 1; continue
if p[1301] >= 1: p[1301] += -1; p[1302] += 1; continue
if p[1302] >= 1: p[1302] += -1; p[1303] += 1; continue
if p[1303] >= 1: p[1303] += -1; p[1304] += 1; continue
if p[1304] >= 1: p[1304] += -1; p[1305] += 1; continue
if p[525] >= 1 and p[1305] >= 1: p[525] += -1; p[1305] += -1; p[1306] += 1; continue
if p[17] >= 1 and p[1306] >= 1: p[17] += -1; p[1306] += -1; p[1307] += 1; continue
if p[453] >= 1 and p[1307] >= 1: p[453] += -1; p[1307] += -1; p[1308] += 1; continue
if p[121] >= 1 and p[1308] >= 1: p[121] += -1; p[1308] += -1; p[1309] += 1; continue
if p[1309] >= 1: p[1309] += -1; p[1310] += 1; continue
if p[1310] >= 1: p[1310] += -1; p[1311] += 1; continue
if p[1311] >= 1: p[1311] += -1; p[1312] += 1; continue
if p[217] >= 1 and p[1312] >= 1: p[217] += -1; p[1312] += -1; p[1313] += 1; continue
if p[215] >= 1 and p[1313] >= 1: p[215] += -1; p[1313] += -1; p[1314] += 1; continue
if p[1314] >= 1: p[1314] += -1; p[1315] += 1; continue
if p[519] >= 1 and p[1315] >= 1: p[519] += -1; p[1315] += -1; p[1316] += 1; continue
if p[231] >= 1 and p[1316] >= 1: p[231] += -1; p[1316] += -1; p[1317] += 1; continue
if p[106] >= 1 and p[1317] >= 1: p[106] += -1; p[1317] += -1; p[1318] += 1; continue
if p[30] >= 1 and p[1318] >= 1: p[30] += -1; p[1318] += -1; p[1319] += 1; continue
if p[1319] >= 1: p[1319] += -1; p[1320] += 1; continue
if p[1320] >= 1: p[1320] += -1; p[1321] += 1; continue
if p[523] >= 1 and p[1321] >= 1: p[523] += -1; p[1321] += -1; p[1322] += 1; continue
if p[1322] >= 1: p[1322] += -1; p[1323] += 1; continue
if p[661] >= 1 and p[1323] >= 1: p[661] += -1; p[1323] += -1; p[1324] += 1; continue
if p[1324] >= 1: p[1324] += -1; p[1325] += 1; continue
if p[630] >= 1 and p[1325] >= 1: p[630] += -1; p[1325] += -1; p[1326] += 1; continue
if p[1326] >= 1: p[1326] += -1; p[1327] += 1; continue
if p[1327] >= 1: p[1327] += -1; p[1328] += 1; continue
if p[1328] >= 1: p[1328] += -1; p[1329] += 1; continue
if p[1329] >= 1: p[1329] += -1; p[1330] += 1; continue
if p[1330] >= 1: p[1330] += -1; p[1331] += 1; continue
if p[457] >= 1 and p[1331] >= 1: p[457] += -1; p[1331] += -1; p[1332] += 1; continue
if p[1332] >= 1: p[1332] += -1; p[1333] += 1; continue
if p[613] >= 1 and p[1333] >= 1: p[613] += -1; p[1333] += -1; p[1334] += 1; continue
if p[455] >= 1 and p[1334] >= 1: p[455] += -1; p[1334] += -1; p[1335] += 1; continue
if p[1335] >= 1: p[1335] += -1; p[1336] += 1; continue
if p[1336] >= 1: p[1336] += -1; p[1337] += 1; continue
if p[1337] >= 1: p[1337] += -1; p[1338] += 1; continue
if p[1338] >= 1: p[1338] += -1; p[1339] += 1; continue
if p[1339] >= 1: p[1339] += -1; p[1340] += 1; continue
if p[1340] >= 1: p[1340] += -1; p[1341] += 1; continue
if p[1341] >= 1: p[1341] += -1; p[1342] += 1; continue
if p[1342] >= 1: p[1342] += -1; p[1343] += 1; continue
if p[1343] >= 1: p[1343] += -1; p[1344] += 1; continue
if p[505] >= 1 and p[1344] >= 1: p[505] += -1; p[1344] += -1; p[1345] += 1; continue
if p[1345] >= 1: p[1345] += -1; p[1346] += 1; continue
if p[1346] >= 1: p[1346] += -1; p[1347] += 1; continue
if p[1347] >= 1: p[1347] += -1; p[1348] += 1; continue
if p[1348] >= 1: p[1348] += -1; p[1349] += 1; continue
if p[131] >= 1 and p[1349] >= 1: p[131] += -1; p[1349] += -1; p[1350] += 1; continue
if p[1350] >= 1: p[1350] += -1; p[1351] += 1; continue
if p[1351] >= 1: p[1351] += -1; p[1352] += 1; continue
if p[532] >= 1 and p[1352] >= 1: p[532] += -1; p[1352] += -1; p[1353] += 1; continue
if p[529] >= 1 and p[1353] >= 1: p[529] += -1; p[1353] += -1; p[1354] += 1; continue
if p[1354] >= 1: p[1354] += -1; p[1355] += 1; continue
if p[1355] >= 1: p[1355] += -1; p[1356] += 1; continue
if p[1356] >= 1: p[1356] += -1; p[1357] += 1; continue
if p[1357] >= 1: p[1357] += -1; p[1358] += 1; continue
if p[226] >= 1 and p[1358] >= 1: p[226] += -1; p[1358] += -1; p[1359] += 1; continue
if p[1359] >= 1: p[1359] += -1; p[1360] += 1; continue
if p[414] >= 1 and p[1360] >= 1: p[414] += -1; p[1360] += -1; p[1361] += 1; continue
if p[1361] >= 1: p[1361] += -1; p[1362] += 1; continue
if p[1362] >= 1: p[1362] += -1; p[1363] += 1; continue
if p[459] >= 1 and p[1363] >= 1: p[459] += -1; p[1363] += -1; p[1364] += 1; continue
if p[1364] >= 1: p[1364] += -1; p[1365] += 1; continue
if p[1365] >= 1: p[1365] += -1; p[1366] += 1; continue
if p[1366] >= 1: p[1366] += -1; p[1367] += 1; continue
if p[1367] >= 1: p[1367] += -1; p[1368] += 1; continue
if p[50] >= 1 and p[1368] >= 1: p[50] += -1; p[1368] += -1; p[1369] += 1; continue
if p[646] >= 1 and p[1369] >= 1: p[646] += -1; p[1369] += -1; p[1370] += 1; continue
if p[1370] >= 1: p[1370] += -1; p[1371] += 1; continue
if p[1371] >= 1: p[1371] += -1; p[1372] += 1; continue
if p[1372] >= 1: p[1372] += -1; p[1373] += 1; continue
if p[507] >= 1 and p[1373] >= 1: p[507] += -1; p[1373] += -1; p[1374] += 1; continue
if p[1374] >= 1: p[1374] += -1; p[1375] += 1; continue
if p[224] >= 1 and p[1375] >= 1: p[224] += -1; p[1375] += -1; p[1376] += 1; continue
if p[1376] >= 1: p[1376] += -1; p[1377] += 1; continue
if p[1377] >= 1: p[1377] += -1; p[1378] += 1; continue
if p[1378] >= 1: p[1378] += -1; p[1379] += 1; continue
if p[1379] >= 1: p[1379] += -1; p[1380] += 1; continue
if p[1380] >= 1: p[1380] += -1; p[1381] += 1; continue
if p[1381] >= 1: p[1381] += -1; p[1382] += 1; continue
if p[1382] >= 1: p[1382] += -1; p[1383] += 1; continue
if p[1383] >= 1: p[1383] += -1; p[1384] += 1; continue
if p[1384] >= 1: p[1384] += -1; p[1385] += 1; continue
if p[1385] >= 1: p[1385] += -1; p[1386] += 1; continue
if p[1386] >= 1: p[1386] += -1; p[1387] += 1; continue
if p[1387] >= 1: p[1387] += -1; p[1388] += 1; continue
if p[302] >= 1 and p[1388] >= 1: p[302] += -1; p[1388] += -1; p[1389] += 1; continue
if p[1389] >= 1: p[1389] += -1; p[1390] += 1; continue
if p[23] >= 1 and p[1390] >= 1: p[23] += -1; p[1390] += -1; p[1391] += 1; continue
if p[235] >= 1 and p[1391] >= 1: p[235] += -1; p[1391] += -1; p[1392] += 1; continue
if p[603] >= 1 and p[1392] >= 1: p[603] += -1; p[1392] += -1; p[1393] += 1; continue
if p[555] >= 1 and p[1393] >= 1: p[555] += -1; p[1393] += -1; p[1394] += 1; continue
if p[260] >= 1 and p[1394] >= 1: p[260] += -1; p[1394] += -1; p[1395] += 1; continue
if p[1395] >= 1: p[1395] += -1; p[1396] += 1; continue
if p[1396] >= 1: p[1396] += -1; p[1397] += 1; continue
if p[16] >= 1 and p[1397] >= 1: p[16] += -1; p[1397] += -1; p[1398] += 1; continue
if p[540] >= 1 and p[1398] >= 1: p[540] += -1; p[1398] += -1; p[1399] += 1; continue
if p[1399] >= 1: p[1399] += -1; p[1400] += 1; continue
if p[1400] >= 1: p[1400] += -1; p[1401] += 1; continue
if p[1401] >= 1: p[1401] += -1; p[1402] += 1; continue
if p[1402] >= 1: p[1402] += -1; p[1403] += 1; continue
if p[219] >= 1 and p[1403] >= 1: p[219] += -1; p[1403] += -1; p[1404] += 1; continue
if p[418] >= 1 and p[1404] >= 1: p[418] += -1; p[1404] += -1; p[1405] += 1; continue
if p[1405] >= 1: p[1405] += -1; p[1406] += 1; continue
if p[1406] >= 1: p[1406] += -1; p[1407] += 1; continue
if p[412] >= 1 and p[1407] >= 1: p[412] += -1; p[1407] += -1; p[1408] += 1; continue
if p[1408] >= 1: p[1408] += -1; p[1409] += 1; continue
if p[1409] >= 1: p[1409] += -1; p[1410] += 1; continue
if p[1410] >= 1: p[1410] += -1; p[1411] += 1; continue
if p[331] >= 1 and p[1411] >= 1: p[331] += -1; p[1411] += -1; p[1412] += 1; continue
if p[237] >= 1 and p[1412] >= 1: p[237] += -1; p[1412] += -1; p[1413] += 1; continue
if p[662] >= 1 and p[1413] >= 1: p[662] += -1; p[1413] += -1; p[1414] += 1; continue
if p[510] >= 1 and p[1414] >= 1: p[510] += -1; p[1414] += -1; p[1415] += 1; continue
if p[247] >= 1 and p[1415] >= 1: p[247] += -1; p[1415] += -1; p[1416] += 1; continue
if p[1416] >= 1: p[1416] += -1; p[1417] += 1; continue
if p[624] >= 1 and p[1417] >= 1: p[624] += -1; p[1417] += -1; p[1418] += 1; continue
if p[1418] >= 1: p[1418] += -1; p[1419] += 1; continue
if p[1419] >= 1: p[1419] += -1; p[1420] += 1; continue
if p[542] >= 1 and p[1420] >= 1: p[542] += -1; p[1420] += -1; p[1421] += 1; continue
if p[1421] >= 1: p[1421] += -1; p[1422] += 1; continue
if p[562] >= 1 and p[1422] >= 1: p[562] += -1; p[1422] += -1; p[1423] += 1; continue
if p[39] >= 1 and p[1423] >= 1: p[39] += -1; p[1423] += -1; p[1424] += 1; continue
if p[341] >= 1 and p[1424] >= 1: p[341] += -1; p[1424] += -1; p[1425] += 1; continue
if p[1425] >= 1: p[1425] += -1; p[1426] += 1; continue
if p[1426] >= 1: p[1426] += -1; p[1427] += 1; continue
if p[1427] >= 1: p[1427] += -1; p[1428] += 1; continue
if p[1428] >= 1: p[1428] += -1; p[1429] += 1; continue
if p[1429] >= 1: p[1429] += -1; p[1430] += 1; continue
if p[1430] >= 1: p[1430] += -1; p[1431] += 1; continue
if p[1431] >= 1: p[1431] += -1; p[1432] += 1; continue
if p[1432] >= 1: p[1432] += -1; p[1433] += 1; continue
if p[1433] >= 1: p[1433] += -1; p[1434] += 1; continue
if p[104] >= 1 and p[1434] >= 1: p[104] += -1; p[1434] += -1; p[1435] += 1; continue
if p[1435] >= 1: p[1435] += -1; p[1436] += 1; continue
if p[550] >= 1 and p[1436] >= 1: p[550] += -1; p[1436] += -1; p[1437] += 1; continue
if p[1437] >= 1: p[1437] += -1; p[1438] += 1; continue
if p[1438] >= 1: p[1438] += -1; p[1439] += 1; continue
if p[1439] >= 1: p[1439] += -1; p[1440] += 1; continue
if p[1440] >= 1: p[1440] += -1; p[1441] += 1; continue
if p[1441] >= 1: p[1441] += -1; p[1442] += 1; continue
if p[452] >= 1 and p[1442] >= 1: p[452] += -1; p[1442] += -1; p[1443] += 1; continue
if p[18] >= 1 and p[1443] >= 1: p[18] += -1; p[1443] += -1; p[1444] += 1; continue
if p[1444] >= 1: p[1444] += -1; p[1445] += 1; continue
if p[1445] >= 1: p[1445] += -1; p[1446] += 1; continue
if p[423] >= 1 and p[1446] >= 1: p[423] += -1; p[1446] += -1; p[1447] += 1; continue
if p[515] >= 1 and p[1447] >= 1: p[515] += -1; p[1447] += -1; p[1448] += 1; continue
if p[1448] >= 1: p[1448] += -1; p[1449] += 1; continue
if p[1449] >= 1: p[1449] += -1; p[1450] += 1; continue
if p[259] >= 1 and p[1450] >= 1: p[259] += -1; p[1450] += -1; p[1451] += 1; continue
if p[1451] >= 1: p[1451] += -1; p[1452] += 1; continue
if p[241] >= 1 and p[1452] >= 1: p[241] += -1; p[1452] += -1; p[1453] += 1; continue
if p[1453] >= 1: p[1453] += -1; p[1454] += 1; continue
if p[1454] >= 1: p[1454] += -1; p[1455] += 1; continue