#include <bits/stdc++.h>
using namespace std;
int arr[200001], dp[200001];
int main() {
  int N, M, K;
  scanf("%d%d%d", &N, &K, &M);
  for (int i = 0; i < N; i++) {
    scanf("%d", &arr[i]);
  }
  sort(arr, arr + N);
  for (int i = 0; i < N; i++) {
    int x = arr[i] % M;
    dp[x] += 1;
  }
  int flg = -1;
  for (int i = 0; i < M; i++) {
    if (dp[i] >= K) {
      flg = i;
      break;
    }
  }
  if (flg == -1) {
    cout << "No" << endl;
  } else {
    std::vector<int> v;
    for (int i = 0; i < N; i++) {
      if (arr[i] % M == flg) v.push_back(arr[i]);
    }
    cout << "Yes" << endl;
    for (int i = 0; i < K; i++) {
      printf("%d ", v[i]);
    }
  }
  return 0;
}
