51Nod 1080
#include "bits/stdc++.h" using namespace std; #define LL long long #define INF 0x3f3f3f3f3f #define PI acos(-1) #define N 1000000 #define MOD 10 int main() { int n; while(~scanf("%d",&n)) { int c=0,j; for(int i=0;i<=n;i++){ j=sqrt(n-i*i); if(j*j==n-i*i){ if(j<i) break; printf("%d %d\n",i,j); c++; } } if(!c){ printf("No Solution\n"); } } return 0; }