If the probability that a number selected from the set 1,2,3..1000 is divisible by 3 but neither divisible by 5 nor by 7 is m/n, then n-m is:

a) 667
b) 166
c) 500
d) 333