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