#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m;
  cin >> n >> k >> m;
  vector<int> table[100001];
  for (int i = 0; i < 100001; i++) {
    table[i].push_back(0);
  }
  int flag = 1;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    int index = temp % m;
    table[index].push_back(temp);
    table[index][0]++;
    if (table[index][0] >= k) {
      flag = 0;
      cout << "Yes" << endl;
      for (int i = 1; i < k; i++) cout << table[index][i] << " ";
      cout << table[index][k] << endl;
      break;
    }
  }
  if (flag) cout << "No" << endl;
}
