#include <bits/stdc++.h>
using namespace std;
vector<long long int> glen(100001);
long long int M = 1000000007;
long long int n1, n2 = 0, sum = 0;
long long int gcd(long long int a, long long int b) {
  return (b == 0) ? a : gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  long long int g = gcd(a, b);
  long long int l = (a * b) / g;
  return l;
}
long long int po(long long int a, long long int b) {
  if (b == 0) return 1;
  long long int temp = po(a, b / 2);
  long long int z = ((temp % M) * (temp % M)) % M;
  if (b % 2)
    return ((z % M) * (a % M)) % M;
  else
    return z;
}
bool fun1(char c) {
  if (c == '1' || c == '2') return true;
  return false;
}
bool fun3(char c) {
  if (c == '1' || c == '2') return false;
  return true;
}
long long int fun(long long int dp[], long long int n, long long int left) {
  if (dp[n] != 0) return dp[n];
  if (n == left) return 1;
  long long int ans = 0;
  long long int limit = n - left;
  for (long long int i = 1; i < limit + 1; i++) {
    ans += fun(dp, n - i, left - 1);
  }
  return ans;
}
bool compare(pair<double, long long int> p1, pair<double, long long int> p2) {
  if (p1.first != p2.first) {
    return p1.first > p2.first;
  }
  return p1.second < p2.second;
}
struct HASH {
  size_t operator()(const pair<double, long long int>& x) const {
    return hash<long long>()(((long long)x.first) ^
                             (((long long)x.second) << 32));
  }
};
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  long long int cs = 1;
  while (t--) {
    long long int n, k, m;
    cin >> n >> k >> m;
    long long int ans = 0;
    long long int a[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    long long int b;
    map<long long int, vector<long long int>> mp;
    for (long long int i = 0; i < n; i++) {
      b = a[i] % m;
      mp[b].push_back(a[i]);
    }
    long long int f = 0;
    for (auto i : mp) {
      if (mp[i.first].size() >= k) {
        f = 1;
        cout << "Yes\n";
        long long int s = 0;
        for (auto j : mp[i.first]) {
          cout << j << ' ';
          s++;
          if (s == k) break;
        }
        break;
      }
    }
    if (f == 0) cout << "No\n";
  }
  return 0;
}
