The perimeters of two similar triangles ABC and PQR are 32 cm and 24 cm respectively. If PQ = 12 cm, find AB.