My code has managed to pass 4 out of 5 test cases except one test case. Please help me with what I have missed. Here is the code:
#include
using namespace std;
int main() {
long long int n;
cin>>n;
if(n%2 == 0){
cout<<(n/2)(n/2) - 1<<" "<<(n/2)(n/2) + 1;
}else{
cout<<(nn - 1)/2<<" "<<((n+1)/2)((n+1)/2) + ((n-1)/2)*((n-1)/2) ;
}
return 0;
}