#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 42;
template <typename T>
void pop_front(std::vector<T> &vec) {
  assert(!vec.empty());
  vec.erase(vec.begin());
}
bool compPairF(pair<long long, long long> v1, pair<long long, long long> v2) {
  return v1.first < v2.first;
}
bool compPairS(pair<long long, long long> v1, pair<long long, long long> v2) {
  return v1.second < v2.second;
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
long long power(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
void sol() {
  long long n, m, k;
  cin >> n >> k >> m;
  vector<long long> v1(n);
  map<long long, vector<long long>> mp;
  for (long long i = 0; i < n; i++) {
    cin >> v1[i];
    mp[v1[i] % m].push_back(v1[i]);
  }
  for (auto i : mp) {
    if (i.second.size() >= k) {
      cout << "Yes" << endl;
      for (int j = 0; j < k; j++) {
        cout << i.second[j] << " ";
      }
      cout << endl;
      return;
    }
  }
  cout << "No" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a = 1;
  while (a--) {
    sol();
  }
}
