#include <bits/stdc++.h>
const int maxx = 2e5 + 100;
const double eps = 1e-10;
const int mod = 10007;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
using namespace std;
int n, m, T;
int l, r;
int tot, cnt;
int a[maxx + 5], b[maxx + 5], ans[maxx + 5];
int main() {
  int i, j, k;
  while (scanf("%d %d %d", &n, &m, &k) == 3) {
    memset(b, 0, sizeof b);
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      b[a[i] % k]++;
    }
    int Max = -inf;
    for (i = 0; i < k; i++) {
      if (b[i] > Max) {
        l = i;
        Max = b[i];
      }
    }
    bool ok = Max >= m;
    if (ok) {
      puts("Yes");
      for (i = 0; i < n; i++) {
        if ((a[i] % k) == l) {
          printf("%d ", a[i]);
          m--;
        }
        if (!m) break;
      }
      puts("");
    } else
      puts("No");
  }
  return 0;
}
