#include <bits/stdc++.h>
using namespace std;
int a[100005];
int b[100005], mx = -1;
int main() {
  int n, m, d = 0, k, c, ans = 0;
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    int x = a[i] % m;
    b[x]++;
  }
  for (int i = 0; i < m; i++) {
    if (b[i] > mx) {
      mx = b[i];
      c = i;
    }
  }
  if (mx < k)
    printf("No\n");
  else {
    printf("Yes\n");
    for (int i = 0; i < n; i++) {
      if (a[i] % m == c) {
        printf("%d ", a[i]);
        d++;
      }
      if (d == k) break;
    }
  }
  return 0;
}
