#include <bits/stdc++.h>
using namespace std;
void addmod(int &a, long long b) {
  a = (a + b);
  if (a >= 1000000007) a -= 1000000007;
}
void mulmod(int &a, long long b) { a = (a * b) % 1000000007; }
template <class T>
bool domin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool domax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
int gi() {
  int a;
  scanf("%d", &a);
  return a;
}
long long gll() {
  long long a;
  scanf("%lld", &a);
  return a;
}
vector<int> mds[100007];
int main() {
  int n = gi(), k = gi(), m = gi();
  for (int i = 0; i < n; i++) {
    int a = gi();
    mds[a % m].push_back(a);
  }
  for (int i = 0; i < m; i++)
    if (mds[i].size() >= k) {
      cout << "Yes" << endl;
      for (int j = 0; j < k; j++) {
        cout << mds[i][j] << " ";
      }
      cout << endl;
      return 0;
    }
  cout << "No" << endl;
  return 0;
}
