#include <bits/stdc++.h>
using namespace std;
const int Z = (int)3e3 + 111;
const int N = (int)3e5 + 111;
const int INF = (int)1e9 + 111;
const int MOD = (int)1e9 + 7;
int a[N], b[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k, m;
  cin >> n >> k >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[a[i] % m]++;
  }
  int ost = -228;
  for (int i = 0; i < m; i++)
    if (b[i] >= k) ost = i;
  if (ost == -228) {
    cout << "No";
    return 0;
  }
  cout << "Yes"
       << "\n";
  for (int i = 0; i < n && k; i++)
    if (a[i] % m == ost) {
      k--;
      cout << a[i] << ' ';
    }
  return 0;
}
