Derek buys two submarine sandwiches for an after-school party. One sandwich is 18 inches long and the other sandwich is 12 inches long. Derek wants to cut servings of the same length from both sandwiches without having any sandwich left over. what is the greatest length serving that Derek can cut