#include <bits/stdc++.h>
using namespace std;
int n, k, m;
int A[100009];
vector<int> G[100009];
int read() {
  int r = 0, k = 1;
  char c = getchar();
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') k = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) r = r * 10 + c - '0';
  return r * k;
}
int main() {
  n = read();
  k = read();
  m = read();
  for (int i = 1; i <= n; ++i) {
    int x = read();
    G[x % m].push_back(x);
  }
  for (int i = 0; i <= m; ++i) {
    if (G[i].size() >= k) {
      printf("Yes\n");
      for (int j = 0; j <= k - 1; ++j) {
        printf("%d ", G[i][j]);
      }
      return 0;
    }
  }
  printf("No\n");
  return 0;
}
