Factors of 6: 1, 2, 3, 6; factors of 18: 1, 2, 3, 6, 9, 18.