#!/usr/bin/ruby
puts({
"4"=>"2 2",
"4294967297"=>"641 6700417",
"147573952589676412927"=>"193707721 761838257287",
"3735861143950077172298786717361091737391"=>"38959205766827896783 95891614585505839777",
"1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139"=>"37975227936943673922808872755445627854565536638199 40094690950920881030683735292761468389214899724061",
"27997833911221327870829467638722601621070446786955428537560009929326128400107609345671052955360856061822351910951365788637105954482006576775098580557613579098734950144178863178946295187237869221823983"=>"3532461934402770121272604978198464368671197400197625023649303468776121253679423200058547956528088349 7925869954478333033347085841480059687737975857364219960734330341455767872818152135381409304740185467",
"1230186684530117755130494958384962720772853569595334792197322452151726400507263657518745202199786469389956474942774063845925192557326303453731548268507917026122142913461670429214311602221240479274737794080665351419597459856902143413"=>"33478071698956898786044169848212690817704794983713768568912431388982883793878002287614711652531743087737814467999489 36746043666799590428244633799627952632279158164343087642676032283815739666511279233373417143396810270092798736308917",
"60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000436700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000674337"=>"200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001011 300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000667",
"333177923807718674318376136355244226659417140249629743150833338002265793695756669661263268631715977303039565603402398594452669926995983655279833138482787101596209493546458030586261942099362713224507669775477249627965188366023865692658030751433580001670080855032967822301384822870058401109800035108631"=>"577215664901532860606512090082402431042159335939923598805767234884867726777664670936947063291746749514631447249807082480960504014486542836224173997749 577215664901532860606512090082402431042159335939923598805767234884867726777664670936947063291746749514631447249807082480960504014486542836224173998619",
"40840704496667312100014363982633537494563202191876375672674279700001613281720716982164452729447521883767925124672669986412219979924157569012429672305670254526853693335125200774372275380098336414094965537574542683657134799670183427039228181148525624818893431370004984531935906246426774116894383238865513"=>"13 3141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249143501",
"3646154850295011369707131011438711095400799139943170490872585628683549034362552065955809589514611470241298944167703929337528884908857116141935206466329731087514964112054543019336536216107629523597606330154669196064144182472739556974502462402438903115845725630946428943768540714098264727068026730424033578827886916761701429264950573899186177"=>"6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151 531137992816767098689588206552468627329593117727031923199444138200403559860852242739162502265229285668889329486246501015346579337652707239409519978766587351943831270835393219031728127",
}[gets.chomp])