Prayer Vigil

A puzzle by F. Nazarov from the May-June 1996 issue of Quantum:

On a certain familiar island, some residents always lie, and the others always tell the truth. The total population is 100. Each resident worships one of three gods, the sun god, the moon god, or the Earth god. One day a visitor asks each resident three questions:

  1. Do you worship the sun god?
  2. Do you worship the moon god?
  3. Do you worship the Earth god?

Sixty residents answer yes to the first question, 40 to the second, and 30 to the third. How many residents are liars?

Click for Answer