#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int ans[maxn], a[maxn];
int main() {
  int n, k, m;
  while (~scanf("%d%d%d", &n, &k, &m)) {
    memset(ans, 0, sizeof(ans));
    int flag = -1;
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      ans[a[i] % m]++;
      if (ans[a[i] % m] >= k) flag = a[i] % m;
    }
    if (flag != -1) {
      cout << "Yes" << endl;
      for (int i = 0, j = 0; i < n && j < k; i++) {
        if (a[i] % m == flag) {
          printf("%d%c", a[i], j == k - 1 ? '\n' : ' ');
          j++;
        }
      }
    } else
      cout << "No" << endl;
  }
  return 0;
}
