#include <bits/stdc++.h>
using namespace std;
namespace ib {
char b[100];
}
inline void pi(int x) {
  if (x == 0) {
    putchar(48);
    return;
  }
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  char *s = ib::b;
  while (x) *(++s) = x % 10, x /= 10;
  while (s != ib::b) putchar((*(s--)) + 48);
}
inline void ri(int &x) {
  x = 0;
  static char c;
  bool t(0);
  while (c = getchar(), c < '0' || c > '9')
    if (c == '-')
      t = 1;
    else
      t = 0;
  do x = (x << 1) + (x << 3) + c - '0';
  while (c = getchar(), c >= '0' && c <= '9');
  if (t) x = -x;
}
const int N = 100024;
vector<int> Q[N];
int main() {
  int i, n, m, k, x;
  ri(n);
  ri(k);
  ri(m);
  for (i = 1; i <= n; ++i) {
    ri(x);
    Q[x % m].push_back(x);
  }
  for (i = 0; i < m; ++i) {
    if (Q[i].size() >= k) {
      puts("Yes");
      for (int j = 0; j < k; ++j) cout << Q[i][j] << ' ';
      return 0;
    }
  }
  puts("No");
  return 0;
}
