#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 7;
const int MOD = 1e9 + 7;
int a[MAX], h[MAX], c[MAX] = {0};
int main() {
  int n, m, i, j, k, q;
  scanf("%d %d %d", &n, &k, &m);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  for (i = 0; i < n; i++) {
    h[i] = a[i] % m;
    c[h[i]]++;
  }
  for (i = 0; i < m; i++)
    if (c[i] >= k) break;
  if (i == m) {
    printf("No\n");
    return 0;
  }
  printf("Yes\n");
  j = i, q = 0;
  for (i = 0; i < n && q < k; i++) {
    if (h[i] == j) printf("%d ", a[i]), q++;
  }
  printf("\n");
  return 0;
}
