The table gives the functional groups in four compounds. Which pair of compounds could react together to produce a polyester?
Table: The functional groups in four compounds
| Compound | Functional groups |
|---|---|
| P | two -OH\text{-OH}-OH groups |
| Q | one -OH\text{-OH}-OH group |
| R | two -COOH\text{-COOH}-COOH groups |
| S | one -NH2\text{-NH}_2-NH2 group and one -COOH\text{-COOH}-COOH group |
P and Q
P and R
Q and R
R and S