#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m, x, ans = 0;
  cin >> n >> k >> m;
  vector<int> a[m];
  for (int i = 0; i < n; ++i) {
    cin >> x;
    a[x % m].push_back(x);
  }
  bool found = 0;
  for (int i = 0; i < m; ++i) {
    if (k <= a[i].size()) {
      cout << "Yes" << endl;
      for (int j = 0; j < k; ++j) {
        cout << a[i][j] << " ";
      }
      found = 1;
      break;
    }
  }
  if (!found) {
    cout << "No";
  }
  return 0;
}
