#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 9;
vector<int> vec[maxn];
int main() {
  int n, k, m, a;
  while (cin >> n >> k >> m) {
    for (int i = 0; i < m; i++) vec[i].clear();
    for (int i = 0; i < n; i++) {
      cin >> a;
      vec[a % m].push_back(a);
    }
    bool t = 0;
    for (int i = 0; i < m; i++) {
      if (k > vec[i].size()) continue;
      t = 1;
      cout << "Yes" << endl;
      for (int j = 0; j < k; j++) cout << vec[i][j] << ' ';
      cout << endl;
      break;
    }
    if (!t) {
      cout << "No" << endl;
    }
  }
}
