TM is a trademark, which is a trademark. The trademark in the period between receiving the acceptance notice and getting the registration certificate is a trademark, but it does not mean that it is a registered trademark. After the trademark is approved for registration and the registration certificate is obtained, the R mark can be placed next to it.
If YY appears in a novel, its meaning is most likely to be obscene. Nowadays, people often use the first letter of the pinyin of these two words, which is YY, to represent this word.