#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int a[n];
  int diff[k];
  memset(diff, 0, sizeof(diff));
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    diff[a[i] % k]++;
  }
  int rem = -1;
  for (int i = 0; i < k; i++) {
    if (diff[i] >= m) {
      rem = i;
      break;
    }
  }
  if (rem != -1) {
    cout << "Yes" << endl;
    for (int i = 0; i < n; i++) {
      if (m > 0) {
        if (a[i] % k == rem) {
          cout << a[i] << " ";
          m--;
        }
      } else {
        break;
      }
    }
    cout << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
