set factorial max value to 1000, input number check on factorial and prime input