Pythagoras triplet - now it is not passing the last two testcase

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();

	if (n == 1 || n == 2) {
System.out.println(-1);

}
else if (n % 2 == 0) {
System.out.println(((n * n) / 4) - 1 + " " + (((n * n) / 4) + 1));
}
else if (n % 2 != 0) {
System.out.println((n * n - 1) / 2 + " " + (n * n + 1) / 2);
}
}
}

Hey
Change data Type int to long
try for this input
99999993
correct output :
4999999300000024 4999999300000025