#include <bits/stdc++.h>
using namespace std;
int a[200000];
map<int, vector<int> > se;
int main() {
  int n, k, m;
  cin >> n >> k >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    se[a[i] % m].push_back(a[i]);
  }
  for (auto it = se.begin(); it != se.end(); it++) {
    if ((int)it->second.size() >= k) {
      cout << "Yes\n";
      for (int i = 0; i < k; i++) cout << it->second[i] << ' ';
      cout << '\n';
      return 0;
    }
  }
  cout << "No\n";
  return 0;
}
