#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  map<int, vector<int> > vec;
  for (int i = 0; i < a; i++) {
    int g;
    cin >> g;
    vec[g % c].push_back(g);
  }
  for (int i = 0; i < c; i++) {
    if (vec[i].size() >= b) {
      cout << "Yes" << endl;
      for (int j = 0; j < b; j++) {
        cout << vec[i][j];
        if (j != b - 1) {
          cout << " ";
        } else {
          cout << endl;
        }
      }
      return 0;
    }
  }
  cout << "No" << endl;
}
