#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k, m, i, j;
  cin >> n >> k >> m;
  int ar[n];
  vector<vector<int>> vec(m);
  for (i = 0; i < n; i++) {
    cin >> ar[i];
    vec[ar[i] % m].push_back(ar[i]);
  }
  for (i = 0; i < m; i++) {
    if (vec[i].size() >= k) {
      cout << "Yes" << endl;
      for (j = 0; j < k; j++) {
        cout << vec[i][j] << " ";
      }
      return;
    }
  }
  cout << "No";
}
int main() {
  int tc;
  solve();
  return 0;
}
