#include <bits/stdc++.h>
using namespace std;
int n, k, m;
int a[100010];
int que[100010];
int main() {
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    que[a[i] % m]++;
  }
  bool bo = 0;
  int j = 0;
  for (int i = 0; i < m; i++)
    if (que[i] >= k) {
      bo = 1;
      j = i;
      break;
    }
  int tot = 0;
  if (bo) {
    printf("Yes\n");
    for (int i = 1; i <= n && tot < k; i++)
      if (a[i] % m == j) printf("%d ", a[i]), tot++;
  } else {
    printf("No\n");
  }
  return 0;
}
