If 15 and 21 work, what is L and W?
L = [P ± √(P2 - 2 * 4 * 24)]/4
Use the + choice in ± for L, it is usually longer. W will then be the - choice.
For example, with P = 14, L=4, W=3. With P=15, L=5.19, W=2.31. With P=20, L=8.6, W=1.39.