#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m;
  cin >> n >> k >> m;
  map<int, vector<int> > mp;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    mp[t % m].push_back(t);
  }
  for (auto x : mp) {
    int N = (x.second).size();
    if (N >= k) {
      cout << "Yes" << endl;
      for (int i = 0; i < k; i++) cout << (x.second)[i] << " ";
      exit(0);
    }
  }
  cout << "No";
}
