Which of the following is contagious?

Primary herpetic gingivostomatitis.

Pemphigus.

Recurrent aphthous stomatitis.

Necrotizing ulcerative gingivitis.