#include <iostream>
#include <cmath>
using namespace std;
int main() {
long long n,x,y;
cin>>n;
x=sqrt(n);
y=sqrt((n)-(x*x));
if(x>0&&y>0&&(x*x+y*y)%n==0)
{
cout <<x<<" "<<y<<endl;
}
else{cout<<"No sloutions"<<endl;}
return 0;
}
CiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPGNtYXRoPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpIHsKICAgIApsb25nIGxvbmcgbix4LHk7CmNpbj4+bjsKICAgIHg9c3FydChuKTsKICAgIHk9c3FydCgobiktKHgqeCkpOwogICAgaWYoeD4wJiZ5PjAmJih4KngreSp5KSVuPT0wKQogICAgewpjb3V0IDw8eDw8IiAiPDx5PDxlbmRsOwp9CmVsc2V7Y291dDw8Ik5vIHNsb3V0aW9ucyI8PGVuZGw7fQogICAgcmV0dXJuIDA7Cn0=