def main(): _, M, S = map(int, input().split()) for t in input().split(): a = int(t) S -= a if S % M == 0: print("Yes") else: print("No") main()