An obvious definition for $gcd(a,b)$ with integers $a,b$ (assuming they are both positive) having prime factorizations
$$a=p_1^{\alpha_1}.p_2^{\alpha_2}... p_k^{\alpha_k} \text{ and } b=p_1^{\beta_1}.p_2^{\beta_2}... p_k^{\beta_k}$$
possibly with some of the $\alpha_i$s (or $\beta_j$s) equal to $0$ if the corresponding primes $p_i$s (or $p_j$s) do not appear in the factorization of $a$(or $b$) is
$$gcd(a,b)=p_1^{m_1}.p_2^{m_2}...p_k^{m_k}$$ with $m_i=\min(\alpha_i,\beta_i)$ for $i\in \{1,2,\cdots,k\}$.
Similarly $lcm(a,b)$ is defined as
$$lcm(a,b)=p_1^{M_1}.p_2^{M_2}...p_k^{M_k}$$ with $M_i=\max(\alpha_i,\beta_i)$ for $i\in \{1,2,\cdots,k\}$.
These definitions give a direct proof of the identity $$gcd(a,b)\times lcm(a,b) = ab$$
With $c$ having the prime factorization $$c=p_1^{\gamma_1}.p_2^{\gamma_2}...p_k^{\gamma_k}$$ and extending the definition of the gcd for 3 numbers to give
$$gcd(a,b,c)=p_1^{n_1}.p_2^{n_2}...p_k^{n_k}$$ with $n_i = \min(\alpha_i, \beta_i, \gamma_i) = \min(m_i, \gamma_i)$ for $i\in \{1,2,\cdots,k\}$ and similarly for the lcm, can you do it now?