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