Let N be the number of ordered triples (A, B, C) of integers satisfying the conditions
(a) 0 \leq A<B<C \leq 99,
(b) there exist integers a, b, and c, and prime p where 0 \leq b<a<c<p,
(c) p divides A-a, B-b, and C-c, and
(d) each ordered triple (A, B, C) and each ordered triple (b, a, c) form arithmetic sequences.
Find N.