Is this how you do greatest common factor?

The teacher told us to find find the GCF using this method but how? And which one is the correct Way of doing it?:    4x |_______                                                                                                                              .                          .                  12 |

Do you have to list the factors in order from left to right according to the factor tree?