Given the number *n*, find the smallest positive integer which has exactly *n* divisors. It is guaranteed that for the given *n* the answer will not exceed 10<sup class="upper-index">18</sup>.
The first line of the input contains integer *n* (1 ≤ *n* ≤ 1000).
#include <bits/stdc++.h>
#define int long long
using namespace std;
int a[1005]={1,2,4,6,16,12,64,24,36,48,1024,60,4096,192,144,120,65536,180,262144,240,576,3072,4194304,360,1296,12288,900,960,268435456,720,1073741824,840,9216,196608,5184,1260,68719476736,786432,36864,1680,1099511627776,2880,4398046511104,15360,3600,12582912,70368744177664,2520,46656,6480,589824,61440,4503599627370496,6300,82944,6720,2359296,805306368,288230376151711744,5040,1152921504606846976,3221225472,14400,7560,331776,46080,9187201950435737471,983040,37748736,25920,9187201950435737471,10080,9187201950435737471,206158430208,32400,3932160,746496,184320,9187201950435737471,15120,44100,3298534883328,9187201950435737471,20160,5308416,13194139533312,2415919104,107520,9187201950435737471,25200,2985984,62914560,9663676416,211106232532992,21233664,27720,9187201950435737471,233280,230400,45360,9187201950435737471,2949120,9187201950435737471,430080,129600,13510798882111488,9187201950435737471,50400,9187201950435737471,414720,618475290624,60480,9187201950435737471,11796480,339738624,4026531840,921600,864691128455135232,47775744,55440,60466176,3458764513820540928,9895604649984,16106127360,810000,100800,9187201950435737471,83160,39582418599936,1658880,9187201950435737471,322560,191102976,9187201950435737471,176400,6881280,9187201950435737471,188743680,9187201950435737471,181440,633318697598976,9187201950435737471,241864704,110880,21743271936,9187201950435737471,1166400,1030792151040,9187201950435737471,226800,9187201950435737471,27525120,14745600,3732480,86973087744,1290240,9187201950435737471,9187201950435737471,40532396646334464,166320,3057647616,352800,9187201950435737471,16492674416640,2073600,9187201950435737471,9187201950435737471,221760,2176782336,26542080,58982400,65970697666560,9187201950435737471,12079595520,3240000,967680,2594073385365405696,9187201950435737471,9187201950435737471,277200,9187201950435737471,14929920,9187201950435737471,440401920,5566277615616,48318382080,3869835264,1055531162664960,705600,106168320,9187201950435737471,332640,9187201950435737471,9187201950435737471,8294400,1632960,9187201950435737471,1612800,9187201950435737471,498960,9187201950435737471,9187201950435737471,195689447424,20643840,89060441849856,9187201950435737471,943718400,3870720,15479341056,907200,9187201950435737471,67553994410557440,9187201950435737471,9187201950435737471,356241767399424,554400,782757789696,9187201950435737471,9187201950435737471,2903040,34828517376,3092376453120,9187201950435737471,665280,1587600,9187201950435737471,9187201950435737471,82575360,9187201950435737471,1698693120,18662400,28185722880,9187201950435737471,6451200,5699868278390784,4323455642275676160,9187201950435737471,238878720,9187201950435737471,720720,9187201950435737471,302330880,2822400,9187201950435737471,29160000,49478023249920,139314069504,112742891520,9187201950435737471,5670000,9187201950435737471,1108800,247669456896,9187201950435737471,132710400,1081080,9187201950435737471,197912092999680,50096498540544,11612160,60397977600,9187201950435737471,9187201950435737471,3548160,364791569817010176,955514880,9187201950435737471,9187201950435737471,9187201950435737471,1940400,9187201950435737471,61931520,74649600,9187201950435737471,51840000,1321205760,9187201950435737471,9187201950435737471,241591910400,1995840,9187201950435737471,3166593487994880,9187201950435737471,9187201950435737471,530841600,1209323520,801543976648704,1441440,2821109907456,108716359680,9187201950435737471,9187201950435737471,9187201950435737471,8164800,4899916394579099648,7215545057280,11289600,9187201950435737471,2229025112064,2494800,3206175906594816,9187201950435737471,9187201950435737471,247726080,1152921504606846976,103219200,9187201950435737471,26127360,9187201950435737471,434865438720,9187201950435737471,14192640,9187201950435737471,9187201950435737471,6350400,9187201950435737471,9187201950435737471,202661983231672320,15850845241344,2162160,9187201950435737471,15288238080,11284439629824,3880800,207360000,9187201950435737471,9187201950435737471,115448720916480,51298814505517056,14515200,9187201950435737471,9187201950435737471,15461882265600,9187201950435737471,9187201950435737471,2882880,9187201950435737471,10883911680,9187201950435737471,185794560,63403380965376,412876800,729000000,461794883665920,8493465600,9187201950435737471,9187201950435737471,84557168640,9187201950435737471,22680000,45158400,10644480,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,1194393600,9187201950435737471,9187201950435737471,3603600,101559956668416,9187201950435737471,1511654400,104509440,9187201950435737471,3458764513820540928,9187201950435737471,3963617280,247390116249600,27831388078080,3283124128353091584,338228674560,9187201950435737471,19349176320,39690000,7388718138654720,142657607172096,7761600,9187201950435737471,743178240,9187201950435737471,9187201950435737471,9187201950435737471,4324320,466560000,9187201950435737471,989560464998400,9187201950435737471,9187201950435737471,58060800,180551034077184,17962560,9187201950435737471,9187201950435737471,9187201950435737471,17740800,9187201950435737471,9187201950435737471,4777574400,6486480,9187201950435737471,9187201950435737471,570630428688384,9187201950435737471,21344400,978447237120,4057816381784064,227082240,9187201950435737471,445302209249280,9187201950435737471,9187201950435737471,7205759403792793600,6606028800,9187201950435737471,42577920,9187201950435737471,77396705280,9187201950435737471,9979200,9187201950435737471,9187201950435737471,15832967439974400,472877960873902080,3317760000,9187201950435737471,9187201950435737471,9187201950435737471,6046617600,1781208836997120,9187201950435737471,7207200,9187201950435737471,3913788948480,543581798400,9187201950435737471,1624959306694656,9187201950435737471,9187201950435737471,31933440,57153600,174142586880,9187201950435737471,21646635171840,9187201950435737471,9187201950435737471,9187201950435737471,8648640,9187201950435737471,17463600,64925062108545024,9187201950435737471,9187201950435737471,9187201950435737471,1866240000,908328960,9187201950435737471,9187201950435737471,722534400,11890851840,9187201950435737471,130636800,9187201950435737471,253671505920,2174327193600,9187201950435737471,9187201950435737471,70963200,9187201950435737471,28499341391953920,9187201950435737471,2017612633061982208,259700248434180096,9187201950435737471,13271040000,1672151040,1013309916158361600,9187201950435737471,9187201950435737471,10810800,36520347436056576,9187201950435737471,76441190400,2116316160,9187201950435737471,31046400,9187201950435737471,9187201950435737471,9187201950435737471,204120000,9187201950435737471,346346162749440,11555266180939776,696570347520,101606400,1014686023680,9187201950435737471,9187201950435737471,9187201950435737471,62370000,9187201950435737471,9187201950435737471,9187201950435737471,14414400,9187201950435737471,1238347284480,54419558400,9187201950435737471,9187201950435737471,928972800,9187201950435737471,17297280,2890137600,9187201950435737471,9187201950435737471,1385384650997760,4155203974946881536,250482492702720,9187201950435737471,127733760,9187201950435737471,422785843200,9187201950435737471,9187201950435737471,158760000,9187201950435737471,46221064723759104,46126080,131621703842267136,1823957849085050880,9187201950435737471,6688604160,584325558976905216,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,11664000000,25225200,9187201950435737471,9187201950435737471,9187201950435737471,681246720,9187201950435737471,522547200,9187201950435737471,9187201950435737471,1152921504606846976,362880000,103997395628457984,14533263360,9187201950435737471,9187201950435737471,139156940390400,9187201950435737471,9187201950435737471,1691143372800,2337302235907620864,25945920,96745881600,9187201950435737471,9187201950435737471,22166154415964160,9187201950435737471,9187201950435737471,85377600,9187201950435737471,9187201950435737471,3715891200,9187201950435737471,8465264640,9187201950435737471,4007719883243520,212336640000,21621600,9187201950435737471,14105549537280,9187201950435737471,761014517760,9187201950435737471,9187201950435737471,7678637364666695680,9187201950435737471,406425600,9187201950435737471,9187201950435737471,89812800,415989582513831936,6052837899185946624,9187201950435737471,64939905515520,9187201950435737471,124185600,29859840000,9187201950435737471,9187201950435737471,11145125560320,9187201950435737471,32432400,9187201950435737471,16030879532974080,9187201950435737471,9187201950435737471,37791360000,9187201950435737471,9187201950435737471,2724986880,4892236185600,3458764513820540928,503347627102830592,1135411200,9187201950435737471,9187201950435737471,2226511046246400,287400960,9187201950435737471,9187201950435737471,9187201950435737471,3044058071040,46242201600,9187201950435737471,9187201950435737471,184504320,1944810000,9187201950435737471,386983526400,9187201950435737471,2958148142320582656,69854400,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,1418633882621706240,46656000000,79254226206720,9187201950435737471,36756720,9187201950435737471,9187201950435737471,9187201950435737471,107017666560,8906044184985600,56422198149120,9187201950435737471,50450400,9187201950435737471,1451520000,19568944742400,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,1039038488248320,9187201950435737471,256494072527585280,9187201950435737471,159667200,9187201950435737471,9187201950435737471,870712934400,9187201950435737471,119439360000,108233175859200,8423789045905096704,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,43243200,9187201950435737471,9187201950435737471,192099600,76187381760,9187201950435737471,9187201950435737471,9187201950435737471,2043740160,9187201950435737471,317016904826880,9187201950435737471,4541644800,9187201950435737471,5103000000,9187201950435737471,4156153952993280,9187201950435737471,59454259200,9187201950435737471,9187201950435737471,914457600,9187201950435737471,9187201950435737471,930128855040,9187201950435737471,9187201950435737471,9187201950435737471,249480000,9187201950435737471,496742400,8176589207175692288,138378240,142496706959769600,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,8360755200,151165440000,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,61261200,9187201950435737471,507799783342080,9187201950435737471,9187201950435737471,13589544960000,10581580800,9187201950435737471,1149603840,341510400,9187201950435737471,4854040371421773824,9187201950435737471,9187201950435737471,9187201950435737471,1428840000,43599790080,9187201950435737471,1731730813747200,9187201950435737471,194819716546560,3482851737600,4409024035195715584,9187201950435737471,3720515420160,9187201950435737471,9187201950435737471,9187201950435737471,135444234240,9187201950435737471,436590000,9187201950435737471,66498463247892480,9187201950435737471,713288035860480,9187201950435737471,100900800,9187201950435737471,9187201950435737471,6191736422400,8174960640,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,6502809600,9187201950435737471,9187201950435737471,73513440,9187201950435737471,3265920000,9187201950435737471,9187201950435737471,9187201950435737471,6926923254988800,54358179840000,9187201950435737471,1252412463513600,9187201950435737471,1698218798844215296,638668800,9187201950435737471,902755170385920,2959500902400,233513280,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,230630400,1152921504606846976,9187201950435737471,9119789245425254400,9187201950435737471,9187201950435737471,33443020800,3877669647910174720,110270160,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,1911029760000,2853152143441920,9187201950435737471,9187201950435737471,9187201950435737471,277477200,9187201950435737471,6849130659840,9187201950435737471,20289081908920320,9187201950435737471,2952069120,6792875195376861184,9187201950435737471,3657830400,3117115464744960,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,2540160000,5476377146882523136,9187201950435737471,72666316800,9187201950435737471,9187201950435737471,9187201950435737471,553512960,746496000000,9187201950435737471,9187201950435737471,541776936960,11838003609600,9187201950435737471,9187201950435737471,129729600,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,1360488960000,110830772079820800,944784000000,2787728169342337024,9187201950435737471,23224320000,9187201950435737471,9187201950435737471,9187201950435737471,3458764513820540928,26011238400,9187201950435737471,9187201950435737471,42326323200,9187201950435737471,12468461858979840,20038599416217600,9187201950435737471,9187201950435737471,122522400,9187201950435737471,9187201950435737471,70527747686400,27396522639360,9187201950435737471,3805072588800,9187201950435737471,9187201950435737471,9187201950435737471,8124796533473280,7779240000,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,415134720,9187201950435737471,628689600,9187201950435737471,1218998108160,9187201950435737471,9187201950435737471,9187201950435737471,238112986890240,9187201950435737471,9187201950435737471,1366041600,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,147026880,55725627801600,9187201950435737471,9187201950435737471,227026800,8363184508027011072,324625310542725120,80154397664870400,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,13063680000,9187201950435737471,11808276480,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,7947878400,9187201950435737471,130799370240,9187201950435737471,9187201950435737471,9187201950435737471,1437004800,3478923509760000,9187201950435737471,9187201950435737471,2790386565120,9187201950435737471,15220290355200,2985984000000,9187201950435737471,9187201950435737471,9187201950435737471,2418647040000,922521600,9187201950435737471,9187201950435737471,9187201950435737471,199495389743677440,9187201950435737471,9187201950435737471,8428514190414577664,9187201950435737471,768398400,1298501242170900480,9187201950435737471,9187201950435737471,9187201950435737471,92897280000,9187201950435737471,18393661440,9187201950435737471,6642809450371481600,9187201950435737471,9187201950435737471,396271131033600,9187201950435737471,9187201950435737471,183783600,8138741398091333632,182601737180282880,9187201950435737471,9187201950435737471,9187201950435737471,535088332800,9187201950435737471,23279477760,282110990745600,9187201950435737471,9187201950435737471,403603200,9187201950435737471,9187201950435737471,10160640000,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,2245320000,9187201950435737471,9187201950435737471,9187201950435737471,3809807790243840,9187201950435737471,57776330904698880,496592227661774848,4875992432640,9187201950435737471,1117670400,9187201950435737471,11161546260480,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,9187201950435737471,757632231014400,810810000};
signed main(){
	int n;
	cin>>n;
	cout<<a[n-1]<<endl;
	return 0;
}