#include <bits/stdc++.h>
using namespace std;
vector<int> modarr[100001];
int n, k, m;
int main() {
  cin >> n >> k >> m;
  int input;
  for (int i = 0; i < n; i++) {
    cin >> input;
    modarr[input % m].push_back(input);
  }
  bool done = false;
  for (int i = 0; i <= 100000; i++) {
    if (modarr[i].size() >= k) {
      cout << "Yes" << endl;
      for (int j = 0; j < k; j++) {
        cout << modarr[i][j] << " ";
      }
      done = true;
      break;
    }
  }
  if (!done) cout << "No" << endl;
}
