R is an integral domain.Then prove that if the following two conditions hold then R is a principal ideal domain(PID)
1)any two non zero elements a, b in R have a greatest common divisor which can be written in the form ra+sb for some r,s belonging to R.
2)['a_1 denotes a suffix 1]
If a_1,a_2,a_3,...... are non zero elements of R such that a_(i+1) divides a_i for all i then there is a positive integer N such that a_n is unit times a_N for all n greater than or equal to N.
How to do the sum?