What is wrong in the code?

#include

long long int square(long int x)
{
return static_cast(x) * x;
}

int main()
{
long int n;
while (std::cin >> n) {
if( n <= 2 ) {
std::cout << ā€œ-1\nā€;
}
else {
if ( n % 2 == 0 ) {
long long int q = square(n / 2);
std::cout << (q - 1) << " " << (q + 1) << ā€˜\n’;
}
else {
long long int q = square(n);
std::cout << (q - 1)/2 << " " << (q + 1)/2 << ā€˜\n’;
}
}
}
}

@kasturichakraborty36_24075fa79f00d4e8 You are from java course Right?