#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> k >> m;
  long T[n], ans;
  long mod[m];
  memset(mod, 0, sizeof(mod));
  bool test = false;
  for (int i = 0; i < n; i++) {
    cin >> T[i];
    long c = T[i] % m;
    mod[c]++;
    if (mod[c] == k) {
      ans = c;
      test = true;
    }
  }
  if (test) {
    cout << "Yes" << endl;
    bool Do = false;
    for (int i = 0; i < n && k; i++) {
      if (T[i] % m == ans) {
        cout << T[i];
        if (k > 1) cout << " ";
        k--;
      }
    }
  } else
    cout << "No";
}
