Pythagoras Triplet

How to solve this problem?

this is formulat based question
you have to just use formula

cin>>x;
    if(x<3)cout<<"-1";
	else if(x%2==0){
		cout<<((x*x)/4)-1<<" ";
        cout<<((x*x)/4)+1<<endl;
	}
	else{
		cout<<(x*x-1)/2<<" ";
		cout<<(x*x+1)/2<<endl;
	}

if you want to ask something about this feel free to ask
i hope this helps
if yes show your response with :heart: and don’t forgot to mark doubt as resolved