The factors of $\,27\,$ are:  $\,1\,$  $\,3\,$  $\,9\,$  $\,27$  
The factors of [beautiful math coming... please be patient] $\,18\,$ are:  $\,1\,$  $\,2\,$  $\,3\,$  $\,6\,$  $\,9\,$  $\,18\,$ 
Here's an efficient algorithm for finding the greatest common factor,
when there aren't too many numbers, and they aren't too big.
The process is illustrated by finding the greatest common factor of
[beautiful math coming... please be patient]
$\,18\,$, $\,36\,$, and $\,90\,$:


Think about why this method works.
As you walk through each step of this discussion, keep comparing with the chart above.
Look at the prime factorizations of each number:
Here are some other ways the algorithm might be applied.
Of course, you get the same answer any correct way that you do it!
You can also zip over to wolframalpha.com and type in:
gcd(18,36,90)
The ‘gcd’ stands for greatest common divisor, which is another name for greatest common factor.
The method described here for efficiently finding the greatest common factor
also gives an efficient way to find the
least common multiple (lcm)!
Here's how:
Suppose we now want the least common multiple of $\,18\,$, $\,36\,$, and $\,90\,$.
Start by doing all the same work as above—which is repeated below, for your convenience.
To be a multiple of all three numbers, we first need the shared (common) factors.
These are the numbers in parentheses on the left below, or the vertical (circled) numbers on the right.
To be a multiple of all three numbers, we also need the nonshared factors.
These are the numbers after the parentheses on the left below, or the numbers along the top on the right.
Multiply the shared and nonshared factors together to get the least common multiple!
[beautiful math coming... please be patient]
$18 = (\color{green}{2\cdot 3\cdot 3})\cdot \color{red}{1}$
[beautiful math coming... please be patient]
$36 = (\color{green}{2\cdot 3\cdot 3})\cdot \color{red}{2}$
[beautiful math coming... please be patient]
$90 = (\color{green}{2\cdot 3\cdot 3})\cdot \color{red}{5}$


shared factors in parentheses: $2\cdot 3\cdot 3$ nonshared factors after parentheses: $1\cdot 2\cdot 5$ $$ \begin{align} \text{lcm} &= (\text{shared})(\text{nonshared})\cr &= (2\cdot 3\cdot 3)\cdot (1\cdot 2\cdot 5)\cr &= 180 \end{align} $$ 
shared factors are vertical (circled): $2\cdot 3\cdot 3$ nonshared factors on the top: $1\cdot 2\cdot 5$ $$ \begin{align} \text{lcm} &= (\text{shared})(\text{nonshared})\cr &= (2\cdot 3\cdot 3)\cdot (1\cdot 2\cdot 5)\cr &= 180 \end{align} $$ 
Want an even more efficient and reliable method?
Zip to WolframAlpha and type in: