#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> k >> m;
  vector<int> v;
  map<int, int> count;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(x);
    count[x % m]++;
  }
  int var = -1;
  for (auto i : count) {
    if (i.second >= k) {
      var = i.first;
      break;
    }
  }
  if (var == -1) {
    cout << "No";
    return 0;
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n; i++) {
    if (v[i] % m == var && k) {
      cout << v[i] << ' ';
      k--;
    }
  }
  return 0;
}
