My outputs are correct according to test cases but after submitting my code, it is showing Testcase 1 and 2 are Wrong. Can you please tell the problem in my code.
#include
using namespace std;
int main()
{
long long int N;
cin>>N;
int m,n;
if(N==1 || N==2){
cout<<"-1"<<endl;
}
else if(N%2==0){
m=N/2;
n=1;
cout<<m*m-n*n<<" "<<m*m+n*n<<endl;
}
else{
m=(N+1)/2;
n=(N-1)/2;
cout<<2*m*n<<" "<<m*m+n*n<<endl;
}
}