Synonyms can be nouns, verbs, adverbs or adjectives, but both words must be of the same part of speech. That means, only a noun can be a synonym of another noun, only a verb can be a synonym of another verb, and so on.