#include <bits/stdc++.h>
using namespace std;
int g[(int)1e5 + 5] = {0};
int main() {
  int n, k, m;
  cin >> n >> k >> m;
  int arr[(int)1e5 + 5];
  for (int i = 0; i < n; i++) cin >> arr[i], g[arr[i] % m]++;
  for (int i = 0; i < m; i++) {
    if (g[i] >= k) {
      cout << "Yes" << endl;
      for (int j = 0; j < n && k; j++) {
        if (arr[j] % m == i)
          if (k == 1)
            cout << arr[j], k--;
          else
            cout << arr[j] << " ", k--;
      }
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
