Noah has 12 yellow square cards and 18 green ones. All the cards are the same size. He would like to arrange the square cards into two rectangles—one of each color. He wants both the yellow and green rectangles to have the same height and to be as tall as possible. What is the tallest possible height for the two rectangles?