Let S be the set of all rational numbers that can be expressed as a repeating decimal in the form 0 . \small\overline{A B C D}, where at least one of the digits a, b, c, or d is nonzero. Let N be the number of distinct numerators obtained when numbers in S are written as fractions in lowest terms. For example, both 4 and 410 are counted among the distinct numerators for numbers in S because 0 . \small\overline{3636}=\frac{4}{11} and 0 . \small\overline{1230}=\frac{410}{3333}. Find the remainder when N is divided by 1000 .