#include <bits/stdc++.h>
using namespace std;
long long int remainders[100005], a[100005];
int main(void) {
  long long int n, k, m, x, maxs, save, i, count = 0;
  cin >> n >> k >> m;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    x = a[i] % m;
    remainders[x]++;
  }
  maxs = 0;
  for (i = 0; i < 100001; i++) {
    if (maxs < remainders[i]) {
      maxs = remainders[i];
      save = i;
    }
  }
  if (maxs < k)
    cout << "No";
  else {
    cout << "Yes\n";
    for (i = 0; i < n; i++) {
      if (a[i] % m == save && count < k) {
        cout << a[i] << " ";
        count++;
      }
    }
  }
  return 0;
}
