#include <bits/stdc++.h>
using namespace std;
vector<int> a;
int main() {
  map<int, int> ma;
  map<int, int>::iterator it;
  int k, m, i, n, ai, r = -1, k1 = 0;
  cin >> n >> k >> m;
  for (i = 0; i < n; i++) {
    cin >> ai;
    a.push_back(ai);
    ma[ai % m]++;
  }
  for (it = ma.begin(); it != ma.end(); it++) {
    if (it->second >= k) {
      r = it->first;
      cout << "Yes"
           << "\n";
      break;
    }
  }
  if (r == -1) {
    cout << "No";
    return 0;
  }
  for (i = 0; i < n; i++) {
    if (a[i] % m == r) {
      k1++;
      cout << a[i] << ' ';
      if (k1 == k) {
        break;
      }
    }
  }
}
