#include <bits/stdc++.h>
using namespace std;
const long long int inf = 100000000000000001;
const long long int mod = 1000000007;
long long int pow(long long int x, unsigned long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int _pow(long long int a, long long int b) {
  if (!b) return 1;
  long long int temp = _pow(a, b / 2);
  temp = (temp * temp);
  if (b % 2) return (a * temp);
  return temp;
}
long long int invmod(long long int a, long long int m) {
  return pow(a, m - 2, m);
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return (a / gcd(a, b)) * b;
}
bool isprime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
bool coprime(long long int a, long long int b) {
  if (gcd(a, b) == 1)
    return true;
  else
    return false;
}
void sub(long long int &a, long long int b) {
  b %= mod;
  a = (a + mod - b);
  a %= mod;
}
vector<long long int> fact;
void factorial() {
  fact.resize(1e6 + 1);
  fact[0] = 1;
  for (long long int i = 1; i <= 1e6; i++) fact[i] = (fact[i - 1] * i) % mod;
}
long long int ncrmod(long long int n, long long int r, long long int p) {
  if (n < r) return 0;
  if (r == 0) return 1;
  return (fact[n] * invmod(fact[r], p) % p * invmod(fact[n - r], p) % p) % p;
}
const long long int N = 1e5 + 1;
long long int n, x, y, e, mid = 0;
long long int a, c;
void solution() {
  long long int k, m;
  cin >> n >> k >> m;
  long long int temp;
  map<long long int, vector<long long int> > make_pair;
  for (long long int i = 0; i < n; i++) {
    cin >> temp;
    if ((long long int)make_pair[temp % m].size() < k)
      make_pair[temp % m].push_back(temp);
  }
  long long int flag = 0;
  for (auto it : make_pair) {
    if ((long long int)it.second.size() == k) {
      flag = 1;
      cout << "Yes" << endl;
      for (auto iti : it.second) {
        cout << iti << " ";
      }
      break;
    }
  }
  if (!flag) cout << "No" << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long long int t = 1;
  while (t--) {
    solution();
  }
  return 0;
}
