#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], n, k, m, cnt[N];
int main() {
  bool flag = false;
  int id = -1;
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), cnt[a[i] % m]++;
  for (int i = 0; i < N; i++) {
    if (cnt[i] >= k) {
      flag = true;
      id = i;
      break;
    }
  }
  int cnt = 0;
  if (flag) {
    puts("Yes");
    for (int i = 1; i <= n; i++) {
      if (a[i] % m == id) printf("%d ", a[i]), cnt++;
      if (cnt == k) break;
    }
    puts("");
  } else
    puts("No");
  return 0;
}
