#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
const int mod = 1000000000 + 7;
const double eps = 1e-8;
map<int, int> mp;
int a[N];
int main() {
  int n, k, m, ans = -1, cnt = 1;
  cin >> n >> k >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mp[a[i] % m]++;
    if (mp[a[i] % m] >= k && ans == -1) {
      ans = a[i] % m;
    }
  }
  if (ans == -1) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  for (int i = 1; i <= n && cnt <= k; i++) {
    if (a[i] % m == ans) {
      cnt++;
      cout << a[i] << " ";
    }
  }
  return 0;
}
