Shape Encoding

Based on the logic of the first four pairs of words and shapes, figure out what the fifth word is.

The first letter is P if the shapes are circles and B if the shapes are squares.

The second letter is A if the shapes are green and E if the shapes are red.

The third letter is N if the number of shapes is 2 and R if the number of shapes is 3.

The fourth letter is T if the shapes are arranged vertically and S if the shapes are arranged horizontally.

Therefore, the last word should be BENT.