In the given figure, AD is the median of BC and AB=AC. Then △ABD and △ACD are congruent by which criterion?

(A) AAA
(B) SAS
(C) SSS
(D) Both (B) and (C)