#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
map<int, int> mp;
int a[maxn];
int main() {
  int n, k, m;
  ;
  while (scanf("%d%d%d", &n, &k, &m) != EOF) {
    mp.clear();
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      mp[a[i] % m]++;
    }
    int flag = -1;
    for (auto it = mp.begin(); it != mp.end(); it++) {
      if (it->second >= k) flag = it->first;
    }
    if (flag == -1)
      printf("No\n");
    else {
      printf("Yes\n");
      int cnt = 0;
      for (int i = 1; i <= n; i++) {
        if (a[i] % m == flag) {
          cnt++;
          printf("%d ", a[i]);
        }
        if (cnt >= k) break;
      }
      printf("\n");
    }
  }
  return 0;
}
