单项选择题

A total of 40 tourists went on a trip.If 18of the tourists visited site X,18 visited site Y.and 8 visited both site X and site Y,how many visited neither site X nor site Y()

A. 4
B. 10
C. 12
D. 22
E. 28