#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
typedef long long ll;
int main(){
	ll a,b;
	while(scanf("%lld%lld",&a,&b)!=EOF){
		ll x=a;
		ll l=__gcd(a,b);
		a/=l;
		b/=l;
		if(a*a-4*b<0){//韦达定理无解情况
			printf("No Solution\n");
		}
		else{
			ll ans=(a+sqrt(a*a-4*b))/2;
			ans*=l;
			ll cnt=x-ans;
			if(cnt*ans/__gcd(cnt,ans)==b*l){
				printf("%lld %lld\n",cnt,ans);
			}
			else{
				printf("No Solution\n");
			}
		}
	}
	return 0;
}


