1. They believe that Mary lives in Chicago.

2. Mary is believed to live in Chicago.
--------
3. They think that Mary lives in Chicago.

4. Mary is thought to live in Chicago.
--------
5. They know that Mary lives in Chicago.

6. Mary is known to live in Chicago.
---------
7. It seems that Mary lives in Chicago.

8. Mary seems to live in Chicago.
---------------------

Is each pair grammatical? Are they all correct sentences?

They all look good to me.

Yes, each pair is grammatical and they are all correct sentences.

In each pair, the first sentence expresses a belief, thought, knowledge, or appearance about Mary living in Chicago, while the second sentence rephrases the same idea using a verb form that indicates the belief, thought, knowledge, or appearance. This is done by using a passive construction with a verb like "believe," "think," "know," or "seem," followed by an infinitive or a prepositional phrase with "to." This structure allows for different ways of expressing the same meaning.