#include <bits/stdc++.h>
using namespace std;
struct lpl {
  int data;
  int num;
} b[100005];
int n, k, m;
int a[100005];
int asd[100005] = {0};
inline bool cmp(lpl aaa, lpl bbb) {
  if (aaa.num < bbb.num) {
    return true;
  }
  return false;
}
int main() {
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    b[i].num = a[i] % m;
    b[i].data = i;
    asd[a[i] % m]++;
  }
  sort(b + 1, b + n + 1, cmp);
  int cnt = 1;
  int qwe;
  for (int i = 0; i <= 100002; ++i) {
    if (asd[i] >= k) {
      qwe = i;
      printf("Yes\n");
      int p = 0;
      for (int i = 1; i <= n; ++i) {
        if (a[i] % m == qwe) {
          printf("%d ", a[i]);
          p++;
          if (p == k) {
            exit(0);
          }
        }
      }
      exit(0);
      break;
    }
  }
  printf("No");
  return 0;
}
