#include <bits/stdc++.h>
using namespace std;
long long tmp, n, m, i, j, ans, x, a, b, c, k;
long long arr[2000005], brr[2000005];
vector<long long> v;
string s;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k >> m;
  for (i = 0; i < n; i++) {
    cin >> brr[i];
    arr[brr[i] % m]++;
  }
  for (i = 0; i < m; i++)
    if (arr[i] >= k) break;
  if (i == m) {
    cout << "No\n";
    return 0;
  }
  long long cnt = 0;
  cout << "Yes\n";
  for (j = 0; j < n; j++)
    if (brr[j] % m == i && cnt < k) {
      cout << brr[j] << " ";
      cnt++;
    }
  return 0;
}
