#include <bits/stdc++.h>
using namespace std;
int n, k, m, x;
int cnt[100005];
vector<int> v[100005];
int main() {
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &x);
    ++cnt[x % m];
    v[x % m].push_back(x);
  }
  for (int i = 0; i < m; ++i)
    if (cnt[i] >= k) {
      puts("Yes");
      for (int j = 0; j < k; ++j) printf("%d ", v[i][j]);
      printf("\n");
      return 0;
    }
  puts("No");
  return 0;
}
