#include<iostream>
#include<string.h>
#include<stdio.h>
#include<algorithm>
#define ll long long
using namespace std;
ll gcd(ll a,ll b){
return a%b==?b:gcd(b,a%b);
}
int main(){
ll a,b;
ll ans1,ans2;
while(~scanf("%lld%lld",&a,&b))
{
ll g=gcd(a,b);
int flag=;
if (a*a-*b*g<){
flag=;
}else {
ll sq=a*a-*b*g;
ll tmp=sqrt(sq);
if (tmp*tmp!=sq){
flag=;
}else {
ll fz1=a+(ll)tmp;
ll fz2=a-(ll)tmp;
if(fz1%== || fz2%==){
flag=;
}else {
ans1=fz1/;
ans2=fz2/;
}
}
}
if(flag)printf("No Solution\n");
else printf("%lld %lld\n",min(ans1,ans2),max(ans1,ans2));
}
return ;
}