#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m;
  cin >> n >> k >> m;
  vector<int> md(m), a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    md[a[i] % m]++;
  }
  for (int i = 0; i < m; ++i) {
    if (md[i] >= k) {
      cout << "Yes"
           << "\n";
      int cur = 0;
      for (int j = 0; j < n; ++j) {
        if ((a[j] % m) == i) {
          if (cur < k) {
            cout << a[j] << " ";
            cur++;
          }
        }
      }
      return 0;
    }
  }
  cout << "No";
}
