Let $m_1, m_2, \ldots , m_r$, $r \geq 2$, be non zero integers which do not have a common prime divisor. Show that there exists $a_1, \ldots , a_r \in \Bbb Z$, such that
$$\sum_{i=1}^r a_i \cdot m_i = 1$$
I am new in this area, any help would be appreciate!