#include <bits/stdc++.h>
using namespace std;
const int N = 1000001;
map<long long, long long> mp1;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long i, j, z, z1, q, r, a1, l, d, f = -1, t, k, n, m, v0, v1, x, y,
                                         index, b, c;
  cin >> n >> k >> m;
  long long a[n + 1];
  for (i = 0; i < n; i++) {
    cin >> x;
    a[i] = x;
    mp1[x % m]++;
  }
  y = -1;
  for (i = 0; i < 1000000; i++)
    if (mp1[i] >= k) {
      y = i;
      break;
    }
  if (y == -1)
    cout << "No"
         << "\n";
  else {
    long long count = 0;
    cout << "Yes"
         << "\n";
    for (i = 0; i < n; i++) {
      if (a[i] % m == y) {
        count++;
        cout << a[i] << " ";
      }
      if (count == k) break;
    }
  }
  return 0;
}
