#include <bits/stdc++.h>
struct heapCmp {
  bool operator()(int i, int j) { return i > j; }
};
template <typename T>
bool cmp(T x, T y) {
  return x > y;
}
using namespace std;
int arr[100005], modo[100005];
int main() {
  int i, j, k, n, m, ans;
  cin >> n >> k >> m;
  for (i = 0; i <= m; ++i) modo[i] = 0;
  for (i = 1; i <= n; ++i) {
    cin >> arr[i];
    ++modo[arr[i] % m];
  }
  ans = -1;
  for (i = 0; i < m; ++i) {
    if (modo[i] >= k) {
      ans = i;
      break;
    }
  }
  int flag = 0;
  if (ans == -1)
    std::cout << "No" << std::endl;
  else {
    std::cout << "Yes" << std::endl;
    for (i = 1; i <= n; ++i) {
      if (k > 0 && arr[i] % m == ans) {
        if (flag == 0) {
          flag = 1;
          std::cout << arr[i];
        } else
          std::cout << " " << arr[i];
        --k;
      }
    }
    std::cout << std::endl;
  }
  return 0;
}
