Please help!! getting correct answer but not able to pass conditions
package com.codegym.task.task15.task1531;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
/*
Factorial
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int input = Integer.parseInt(reader.readLine());
reader.close();
System.out.println(factorial(input));
}
public static String factorial(int n) {
//write your code here
String s = "";
BigInteger product = new BigInteger("1");
if(n>0){
while(n>0){
product = product.multiply(BigInteger.valueOf(n));
n--;
}
s = product.toString();
}
else if(n<0){
s = "0";
}
else if(n==0)
s= "0! = 1";
return s;
}
}