What condition is necessary for a glacier to form?

more snow falling than snow melting
a valley to accumulate ice
steep slopes for ice to flow down
more rain falling than ice melting

cold temperatures