A survey of 500 farmers showed that of the farmers, 126 grew only wheat, 106 grew only corn, 87 grew only oats, 206 grew wheat, 65 grew wheat and corn, 51 grew wheat and oats, and 182 grew corn. Determine the number of farmers who a) grew at least one of the three, b) grew all three, c) did not grow any of the three, and d) grew exactly two of the three.