#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long long int, long long int>& a,
          pair<long long int, long long int>& b) {
  return min(2 * a.first, a.second) - a.first >
         min(2 * b.first, b.second) - b.first;
}
long long int mod = 1e9 + 7;
long long int moc(long long int w, long long int z) {
  return ((w % mod) * (z % mod)) % mod;
}
int main() {
  int t;
  t = 1;
  map<long long int, vector<long long int>> mp;
  vector<long long int> v;
  while (t--) {
    long long int n, k, m;
    cin >> n >> k >> m;
    long long int a[n + 5];
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
      mp[a[i] % m].push_back(a[i]);
    }
    for (auto it : mp) {
      if (it.second.size() >= k) {
        cout << "Yes" << endl;
        for (long long int i = 0; i < k; i++) {
          cout << it.second[i] << " ";
        }
        return 0;
      }
    }
    cout << "No";
  }
  return 0;
}
