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).
p=["1","2","4","6","16","12","64","30","36","48","1024","60","4096","192","144","210","65536","180","262144","240","576","3072","4194304","420","1296","12288","900","960","268435456","720",
"1073741824","2310","9216","196608","5184","1260","68719476736","786432","36864","1680","1099511627776","2880","4398046511104","15360","3600","12582912","70368744177664","4620","46656","6480","589824","61440","4503599627370496","6300","82944","6720","2359296","805306368","288230376151711744","5040",
"1152921504606846976","3221225472","14400","30030","331776","46080","73786976294838206464","983040","37748736","25920","1180591620717411303424","13860","4722366482869645213696","206158430208","32400","3932160","746496","184320","202231454903657293676544","18480","44100","3298534883328","635703278458516698824704","20160","5308416","13194139533312","2415919104","107520","1385009821345068724781056","25200",
"2985984","62914560","9663676416","211106232532992","21233664","60060","2162514264337593543950336","233280","230400","45360","2500228229401496703205376","2949120","2400912917605986812821504","430080","129600","13510798882111488","1914606681695789005144064","69300","2358426726783156020576256","414720","618475290624","73920","2834827628530496329220096","11796480","339738624","4026531840","921600","864691128455135232","47775744","55440",
"60466176","3458764513820540928","9895604649984","16106127360","810000","100800","3915865843651857942052864","510510","39582418599936","1658880","16253853498429727072845824","322560","191102976","221360928884514619392","176400","6881280","24646623899502532662132736","188743680","16386495598010130648530944","181440","633318697598976","3541774862152233910272","241864704","180180","21743271936","14167099448608935641088","1166400","1030792151040","25571492362373784095686656","226800",
"17285969449495136382746624","27525120","14745600","3732480","86973087744","1290240","26302044767688728495783936","606694364710971881029632","40532396646334464","240240","3057647616","485100","18830865132078623730171904","16492674416640","2073600","1907109835375550096474112","19493842113257979682750464","221760","2176782336","26542080","58982400","65970697666560","27005895248510699696029696","12079595520","3240000","1182720","2594073385365405696","4155029464035206174343168","19577295904684780545900544","277200",
"27909183618739122183602176","14929920","10376293541461622784","440401920","5566277615616","48318382080","3869835264","1055531162664960","705600","106168320","19604025588861116008628224","1021020","28416102355444464034512896","6487542793012780631851008","8294400","1632960","28757637687111424552206336","1612800","19230550748445698208825344","498960","664082786653543858176","7500684688204490109616128","195689447424","20643840","89060441849856","7202738752817960438464512","943718400","4730880","15479341056","907200",
"25135865633579863348609024","67553994410557440","10625324586456701730816","5743820045087367015432192","356241767399424","900900","782757789696","7075280180349468061728768","42501298345826806923264","2903040","34828517376","3092376453120","29305635143120275902562304","960960","1587600","8504482885591488987660288","33790162289924414440996864","82575360","43060649159697657763987456","1698693120","18662400","28185722880","39370386555162524223799296","6451200","5699868278390784","4323455642275676160","1820083094132915643088896","238878720","34904739530401550323154944","720720",
"45618958121606201292619776","302330880","5336100","17293822569102704640","29160000","49478023249920","139314069504","112742891520","5721329506126650289422336","5670000","35313116524750123642650624","1108800","247669456896","11747597530955573826158592","132710400","9699690","53039457584007913129639936","197912092999680","50096498540544","11612160","60397977600","48761560495289181218537472","212725285376506440296955904","3548160","364791569817010176","955514880","12465088392105618523029504","1106804644422573096960","319318264096412179005177856","1940400",
"213473056385648716020711424","75694080","74649600","73939871698507597986398208","51840000","1321205760","319975608681517825325531136","49159486794030391945592832","241591910400","1995840","320309738904285205208498176","3166593487994880","214438955617140820833992704","17708874310761169551360","530841600","1209323520","801543976648704","3063060","2821109907456","108716359680","19462628379038341895553024","70835497243044678205440","321290551952200534008528896","8164800","23346660468288651264","7215545057280","11289600","76714477087121352287059968","2229025112064","2494800",
"3206175906594816","51857908348485409148239872","22502054064613470328848384","302776320","93386641873154605056","103219200","215703184853549195737432064","26127360","21608216258453881315393536","434865438720","216450957656787131798913024","14192640","322903830627148527195652096","78906134303066185487351808","6350400","1033471823554859405148160","322261290034376435130433536","202661983231672320","15850845241344","4084080","17231460135262101046296576","15288238080","11284439629824","6306300","207360000","56492595396235871190515712","21225840541048404185186304","115448720916480","51298814505517056","14515200",
"219075923223513177023053824","3235549176877750482370560","15461882265600","58481526339773939048251392","5976745079881894723584","2882880","327259086304843329475444736","10883911680","25513448656774466962980864","185794560","63403380965376","412876800","729000000","461794883665920","8493465600","81017685745532099088089088","222404376159569382855409664","84557168640","332617504638277531421638656","22680000","45158400","15375360","335980074212440502746218496","12970366926827028480","95627921278110315577344","6975147320176030871715840","1194393600","58731887714054341637701632","231224749596192175757983744","3603600",
"101559956668416","83727550856217366550806528","1511654400","104509440","382511685112441262309376","51881467707308113920","231735896625196994043838464","4844421120","247390116249600","27831388078080","3283124128353091584","338228674560","341497384012607618805661696","19349176320","39690000","7388718138654720","142657607172096","7761600","232332576806887603562348544","743178240","35242792592866721478475776","58812076766583348025884672","241521228910201656997576704","19399380","466560000","85248307066333392103538688","989560464998400","10837713965063903159255040","470458650252906047844909056","58060800",
"180551034077184","17962560","146284681485867543655612416","86272913061334273656619008","380747847196240787800064","17740800","473714464743948248296718336","57691652245337094626476032","4777574400","6486480","474631435903171972747493376","3320413933267719290880","570630428688384","12503423441022450548080640","21344400","978447237120","4057816381784064","227082240","481047591212025023358304256","445302209249280","221819615095522793959194624","12013693764089802192322560","210119944214597861376","6606028800","1091965555139852604801024","61501440","147478460382091175836778496","77396705280","329333401113623918903558144","9979200",
"486433604454495675614232576","75407596900739590045827072","15832967439974400","472877960873902080","3317760000","53126622932283508654080","840479776858391445504","9619100225436835077160960","6046617600","1781208836997120","333710961403571828974157824","15315300","488443845614287315896631296","3913788948480","543581798400","11876400901747340308643840","1624959306694656","212506491729134034616320","337606119314388217384402944","31933440","57153600","174142586880","335397909030211478150447104","21646635171840","1785795528950566707265536","87916905429360827707686912","230143431261364056861179904","16336320","493166177933534601628614656","17463600",
"64925062108545024","14222414427957444938301440","155573725045456227444719616","101370486869773243322990592","1866240000","908328960","498141550984858016925351936","129181947479092973291962368","722534400","11890851840","496364815757728270805630976","130636800","349959263030913083222523904","310042951680","2174327193600","118111159665487572671397888","368948208494609331560382464","70963200","53790705718937052512256","28499341391953920","236718402909198556462055424","30264189495929733120","259700248434180096","1100415470664578215444480","13271040000","1672151040","1013309916158361600","104714218591204650969464832","391761993919822071326572544","12252240",
"36520347436056576","136856874364818603877859328","76441190400","2116316160","2363655411345077059977216","69369300","427470443474450259602571264","121056757983718932480","169477786188707613571547136","204120000","408627095591204153641140224","346346162749440","11555266180939776","696570347520","101606400","1240171806720","160651291502992840196096","3406647530633251447111680","447436471348263332131897344","62370000","175444579019321817144754176","105939349574250370927951872","447383541572213314110357504","14414400","2518486581521232959635456","1238347284480","54419558400","19637987654777869130792960","610046660621652103062880256","928972800",
"642605166011971360784384","223092870","2890137600","159118372752023739388919808","2473946326084931838541824","1385384650997760","4155203974946881536","250482492702720","243053057236596297264267264","127733760","3856921906287014145557528576","422785843200","2571187625148056582230114304","81307802476445906092687360","158760000","638175856129519320890867712","46221064723759104","46126080","131621703842267136","1823957849085050880","64851834634135142400","6688604160","584325558976905216","7125441960528092615147520","2283141217358909416669184","7747632510958011678720","176195663142163024913104896","957954792289236537015533568","11664000000","25225200",
"3858906812144692131084107776","640419169156946148062134272","251182652568652099652419584","984023040","3032564869435637666676736","522547200","2574735977260296389382897664","123299358492537989931991040","259407338536540569600","362880000","103997395628457984","14533263360","2026730624766167090200576","959926826044553475976593408","139156940390400","81997433970151959727964160","3859440714543502728087207936","1691143372800","2337302235907620864","25945920","96745881600","960929216712855615625494528","2575005730784174597581307904","22166154415964160","3221037910970202666827776","643316866851422462501978112","85377600","23962120175328186859520","3861266770187174245203705856","3715891200",
"2574367080748696980814823424","8465264640","176436230299750044077654016","4007719883243520","212336640000","58198140","3860593167916606772148699136","14105549537280","255744921199000176310616064","761014517760","6327689996258673443209216","10913141895191709477765120","265933054396600418304","95848480701312747438080","406425600","963871655856601602025586688","2577703946605334680267915264","89812800","415989582513831936","116733302341443256320","258818739184002820969857024","79370995630080","3864952582741419537146576896","124185600","29859840000","127872385435606761435299840","173074956736011283879428096","11145125560320","2581865295450850377380921344","32432400",
"3869761181803401509523685376","16030879532974080","16602069666338596454400","86489541742427045741199360","37791360000","12510270323067351644241920","2585815635417696609515864064","3936092160","4892236185600","466933209365773025280","37396835774521933824","1135411200","3874900666732583009015300096","647109554560647587212296192","2226511046246400","287400960","3872210667721328144244801536","12041081292269406576967680","2587442670885312576979206144","3044058071040","46242201600","649352872970361395396739072","12572159760555100365389824","184504320","1944810000","968711491881445581586956288","386983526400","131530671515330927436759040","2958148142320582656","69854400",
"2593779946240315306828365824","1034302764884015836037120","226222790702218770137481216","966783870103129305391300608","4385133335800493306281984","1418633882621706240","46656000000","79254226206720","65633114661417543270400","77597520","3884864950082874192246603776","9757300676310505231482880","2673959800331496768986415104","107017666560","8906044184985600","56422198149120","2674756805303948303782641664","107207100","17019715481382426771456","1451520000","19568944742400","94162976981179355952578560","4010935539452691442089066496","12129202705242020925931520","16562133372807892900511744","1269935930081280","262532458645670173081600","256494072527585280","2677074524972252293700255744","159667200",
"4015898099889009174801022976","657227769670539531069161472","870712934400","3248844238144253376593920","119439360000","108233175859200","8423789045905096704","97507631698869695241256960","263750716288082483123060736","29883725399409473617920","68078861925529707085824","49008960","4021517145381579984990109696","981777258914529988426334208","192099600","76187381760","4024374326105279759841755136","14367243283872334814904320","19872898702105693539794944","2043740160","304111460609319729968971776","317016904826880","2683856870737904629872328704","4541644800","25176535859705145632751616","5103000000","387545842437278919875887104","5079743720325120","2393397489569403764736","59454259200",
"2693758908903585247316148224","135088428727660495440445440","914457600","667213128478708148566228992","16906143438820582531006464","930128855040","47330370277129322496","997852513914832594264915968","354333478996462718014193664","249480000","4029722717271293251735781376","496742400","26623333280885243904","261381120","142496706959769600","1007940222637321508238655488","22666379233691096636719104","90792568487789199360","4033215621451072444360032256","78139606390551577886720","1102077353322891077222400","6926031241232216102010880","33695156183620386816","8360755200","151165440000","97959438570271708188508160","314142655773613952908394496","693674248788576527273951232","2707796365898183024673030144","61261200",
"22265516934764386546876416","507799783342080","410570623094455811633577984","139637754281086832754032640","13589544960000","10581580800","2734069669934854316295716864","1149603840","901800900","312558425562206311546880","189321481108517289984","363170273951156797440","4088058875830676242925879296","695207689875590982131515392","1428840000","62977474560","857047163233901253492736","1731730813747200","2778968053163279547256274944","194819716546560","3482851737600","16415620641765457920","2785788850612472756100399104","3720515420160","25690881352276511750619136","1024492152037822856416985088","3433237653166257235558400","135444234240","17748270956230184750022656","436590000",
"2784545756793025561702170624","81275899525201920","317818048722751112783855616","713288035860480","17763525409106047002476544","100900800","4143928434753635948938919936","696997730420662810687045632","6191736422400","8174960640","4147254956058175183022718976","19813962964333607392378880","21693083824920739000090624","98060383832916740129423360","6502809600","724563686730604970992730112","153177439332441840943104","446185740","4180768750892846853816057856","3265920000","477355118256071218166759424","142141535331666960517693440","5770600014285549661056925696","6926923254988800","54358179840000","10863997755447322114785280","1252412463513600","1411375950758718143534727168","425973332494163902464","638668800",
"812754611742420055883776","902755170385920","2959500902400","233513280","26465626182787008158498816","81423407429337718278062080","3856234054445646756670603264","143864565306671368283095040","1914527568388557962672603136","1103739235981203939000320","26189341198731824001449984","230630400","112709757329767363772416","1421143394231844744890155008","9119789245425254400","96158261226685473132380160","5784871752342278830697742336","33443020800","3029143697736276639744","110270160","7027209802640463075737600","1423894307709515918242480128","551018446969680223535104","23242897532874035036160","1911029760000","2853152143441920","2873864376867709611046600704","12523964087157153836564480","5786997593974090537952608256","277477200",
"3862490375896362151810433024","6849130659840","1921257507470838444186402816","20289081908920320","18900075698368522143924224","2952069120","1703893329976655609856","1443142773636075070074912768","3657830400","3117115464744960","5795244917874843453883416576","123498075477613969795973120","3874779671499373815533666304","12095856348628615346257920","2540160000","1050599721072989306880","3870774743989981048538660864","72666316800","5793798975959924194154643456","3459827775699263024005120","2879780478133660427929780224","1045524480","746496000000","82192301910455879183892480","19801211173896354302787584","541776936960","11838003609600","988000203340871756710674432","3872751382962374814354898944","129729600",
"6140942214464815497216","1459300813363487026842697728","2882787650138566846876483584","125737984503697950229135360","1360488960000","110830772079820800","944784000000","5201657569612922880","1929950600554267387505934336","23224320000","2156489995751704756224","71886360525984560578560","5817458455548958390664298496","4202398884291957227520","26011238400","9633701578057845540126720","5844735288783334250628775936","42326323200","3911141155133337002515103744","12468461858979840","20038599416217600","1001132884210715486922473472","3937058482133392040241659904","290990700","27477515129366675378405376","1465331536842861947689893888","70527747686400","27396522639360","2265180606059534306246656","3805072588800",
"613424469105111281434624","11834806312231382160506880","10965709475958547388825600","8124796533473280","7779240000","287545442103938242314240","5884171273495187319355867136","1012818357943164652153208832","2891614967569804806076760064","415134720","5906140375922997109693874176","628689600","3988861503691988438775496704","1218998108160","583666511707216281600","1006193727090634434451341312","3988084059071815020407947264","238112986890240","35966200022204439756537856","6928977644752833536327680","1366041600","146584527146804138538434560","27262293279626489757696","127917156306820284305899520","20160968279467224217944064","310390080","55725627801600","1479498533800603804885843968","24563768857859261988864","227026800",
"193865196655121704943616","324625310542725120","80154397664870400","14256900995702114568110080","28643873117868896871776256","86668625227281137223598080","4472925287506839283710296064","168952434348866216614952960","12551351615336758221209600","13063680000","4499504600109428539364737024","11808276480","6142889696952548899946496","1494424652954574050776055808","2334666046828865126400","215309737395464866459811840","146959200355271036104605696","7947878400","4504977628013706077372678144","130799370240","1941328663681942761636888576","1489094447273184812416892928","514791505681780502953984","1437004800","3478923509760000","1049877789092739249667571712","12205406461347032884838400","4030558371840","6761891086035023229622419456","15220290355200",
"2985984000000","196855798327437863356989440","1948058618911084186190217216","1106844625483827994681147392","2418647040000","922521600","6764018024965946783339380736","268953528594685262561280","2906134475644336744760868864","199495389743677440","6784188399455148533430091776","131592014545992782310277120","34503839932027276099584","332906084455227064320","768398400","1298501242170900480","4587257565129506139525873664","1102908294652047508111360","759166022727122011815936","92897280000","2900351610309387916173901824","18393661440","6832184168288392929655914496","7093169413108531200","19926072697750396698886144","174571092956023254847324160","396271131033600","1175285981759466213979717632","222388822737346310694764544","232792560",
"21073919720733357899776","182601737180282880","9786503381552526157414400","228184371824093019389296640","28904290791001586795544576","535088332800","4575313237029759482503102464","23279477760","282110990745600","11018277056725385299886080","4657211792476151720049639424","1179278100","147955290949385242779058176","1282411330423350778807713792","10160640000","1331624337820908257280","6974754718473710083176923136","94188930943538067857735680","13244940604963129596575744","2245320000","12046013526210104629657600","1225881286773612460923420672","4828601982317445323323080704","3809807790243840","29368652656025388728713216","57776330904698880","1282470362637926400","4875992432640","138015359728109104398336","1117670400",]
n=int(input())
print(p[n-1])
	 	 		    	   			 		 								