#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i, j, k, l, r, x, y, z, t;
  cin >> n >> k >> m;
  vector<long long int> v[m];
  for (i = 0; i < n; i++) {
    cin >> x;
    r = x % m;
    v[r].push_back(x);
  }
  for (i = 0; i < m; i++) {
    if (v[i].size() >= k) {
      cout << "Yes" << endl;
      for (j = 0; j < k; j++) cout << v[i][j] << " ";
      cout << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
