#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main() {
long long x;
cin >> x;
long long r =(long long)sqrt(x+0.5);
cout << r << " " << r*r-x << "\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNpbmNsdWRlIDxpb21hbmlwPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglsb25nIGxvbmcgeDsKCWNpbiA+PiB4OwoJbG9uZyBsb25nIHIgPShsb25nIGxvbmcpc3FydCh4KzAuNSk7Cgljb3V0IDw8IHIgPDwgIiAiIDw8IHIqci14IDw8ICJcbiI7CglyZXR1cm4gMDsKfQ==