#include <bits/stdc++.h>
using namespace std;
const int N = int(2e5) + 5;
const int inf = (int)1e9 + 7;
int n, k, m;
int cnt[N], a[N];
int main() {
  scanf("%d %d %d", &n, &k, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    cnt[a[i] % m]++;
  }
  int ans = -1;
  for (int i = 0; i < m; ++i) {
    if (cnt[i] >= k) {
      ans = i;
      break;
    }
  }
  if (ans == -1) {
    printf("No\n");
    return 0;
  }
  printf("Yes\n");
  for (int i = 1; i <= n; ++i) {
    if (!k) {
      break;
    }
    if (a[i] % m == ans) {
      printf("%d ", a[i]);
      --k;
    }
  }
  return 0;
}
