what should i do to make it correct so that i pass all test cases. my code is working right with desired results but what i have to change in it so that it pass all test cases. below is my code.
############################################
#include
#include<math.h>
using namespace std;
int main(){
int n,i,j,k;
cin>>n;
if(n<=(10^9)){
if(n>0){
for(i=1;i<10;i++)
{
j=(nn)+(ii);
k=(pow(j,.5));
if(i==n and k==n and j%k==0){
cout<<-1;
break;
}
else if(j%k==0){
cout<<i<<" "<<k;
break;
}
}
}
else{
for(i=-1;i>-10;i--)
{
j=(n*n)+(i*i);
k=pow(j,.5);
if(i==n and k==(-n) and j%k==0){
cout<<-1;
break;
}
else if(j%k==0){
cout<<i<<" "<<-k;
break;
}
}
}
}
else{
cout<<-1;
}
return 0;
}