#include <bits/stdc++.h>
using namespace std;
int a[100009], b[100009], mx = 0;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    int n, k, m;
    cin >> n >> k >> m;
    for (int i = 0; i < n; i++) {
      cin >> b[i];
      a[b[i] % m]++;
    }
    for (int i = 0; i < m; i++) {
      if (a[i] >= k) {
        cout << "Yes" << endl;
        int l = 0;
        for (int j = 0; j < n && l < k; j++) {
          if (b[j] % m == i) {
            cout << b[j] << " ";
            l++;
          }
        }
        return 0;
      }
    }
    cout << "No";
  }
}
