public long factorial(long n){
		/*
		 * function trialDivision(N)
		for s from 2 to floor(sqrt(N))
		if s divides N then
		return s, N/s
		end if
		end for
		end function
		*/
		int i = 2;
		while (i < Math.sqrt(n)){
			if (n%i == 0){
				return factorial (n/i);
			}else {
				i++;
			}
		}
		return n;
	}