Pythagorean triplets

#include<bits/stdc++.h>
using namespace std;

int main()
{
unsigned long long N,A,B;

cin>>N;
if(N%2==0)
{ A=(NN)/4-1;
B=(N
N)/4+1;

}
else
{
A=((N*N)-1)/2;
B=(pow(N+1,2)/4)+(pow(N-1,2)/4);

}

if(A>1&&B>1)
{ if(A>B)
cout<<B<<"\t"<<A;
else
cout<<A<<"\t"<<B;
}

else cout<<"-1";

return 0;
}

i have written this code to find pythagorean triplets but from this code if i input N then other no. i got are always greater than N
for eg if i input 63 i only got 1984 and 1985 but how to get
16 and 65 which are also triplets of 63

i didn’t get any response yet.?

@Ashish2001
Sorry for the delayed response buddy
We TAs also have our final exams and college submissions going on
So please bear with us for the time being
How can I help you ?

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.