Factorise both; multiply common primes to lowest power. HCF(12,18)=2⋅3=6(12,18)=2\cdot 3=6(12,18)=2⋅3=6.