Thanks, Spanner, for the suggestion. In fact, D was OK, but I'd made the mistake of assuming that all the letters were powers of prime numbers, whereas it seems that S is the cube of a composite number. This possibility of using composite numbers gives many more options for the squares than I'm comfortable with, so I think I'll just watch the rugby now, then Endeavour! Thanks again for help offered.