This code is not working for all cases

#include
using namespace std;
int main()
{ int n;
long long int x;
cin>>n;
if(n ==1 || n== 2 )
cout<<-1;
else if(n % 2== 0){
x = (n * n )/4;
cout<<1LL*(x-1)<<" “<<(x+1);
}
else if(n % 2==1){
x = n* n +1;
cout<<1LL*(x/2 -1)<<” "<<x/2;
}

return 0;
}

check ur odd case.
it should be
image

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.