I can't figure out the error in my code of pythagorean triplet. only one test case is showing wrong output

#include
using namespace std;
int main() {
long long int num, m, n;
cin>>num;
if (num % 2){
m = (num + 1) / 2;
n = (num - 1) / 2;
cout<< 2 * m * n<<" “<< m * m + n * n;
}
else if (num <= 2)
cout<<-1;
else{
m = num / 2;
n = 1;
cout << m m - nn<<” "<< m m + nn;
}
return 0;
}