Error in the code of this program

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

int main() {

int n;
cin>>n;
int a,b;

if(n==1 || n==2)
{
cout<<"-1"<<endl;
}
else if(n%2==0)
{
	a=n*n/4-1;
	b=n*n/4+1;
	cout<<a<<" "<<b<<endl;

}
else if(n%2!=0)
{
	a=(n*n-1)/2;
	b=(n*n+1)/2;
	cout<<a<<" "<<b<<endl;

}

return 0;

}

@Senjuti256 N can be quite large so you should take the datatype as long long