#include <bits/stdc++.h>
using namespace std;
const int size = 100 * 1000 + 9;
int mods[size];
vector<int> v[size];
int main(int argc, const char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, k, m;
  cin >> n >> k >> m;
  for (int i = 0; i < size; i++) mods[i] = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    mods[x % m]++;
    v[x % m].push_back(x);
  }
  for (int i = 0; i < m; i++) {
    if (v[i].size() >= k) {
      cout << "Yes\n";
      for (int j = 0; j < k; j++) cout << v[i][j] << " ";
      cout << "\n";
      return 0;
    }
  }
  cout << "No\n";
  return 0;
}
