#include <bits/stdc++.h>
using namespace std;
int read() {
  char c = getchar();
  int t = 0, f = 1;
  while (c > '9' || c < '0') f = (f == '-') ? -1 : 1, c = getchar();
  while (c >= '0' && c <= '9') t = t * 10 + c - '0', c = getchar();
  return t * f;
}
int n, k, m, a[100005];
vector<int> q[100005];
int main() {
  n = read(), k = read(), m = read();
  for (int i = 1; i <= n; i++) a[i] = read(), q[a[i] % m].push_back(i);
  for (int i = 0; i < m; i++)
    if (q[i].size() >= k) {
      puts("Yes");
      for (int j = 0; j < k; j++) printf("%d ", a[q[i][j]]);
      return 0;
    }
  puts("No");
}
