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