#include <bits/stdc++.h>
using namespace std;
int n, k, m;
int a[100001], aMod[100001], aOccur[1000001] = {};
int selectedValue;
bool hasSolution = false;
int main() {
  scanf("%d%d%d\n", &n, &k, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    aMod[i] = a[i] % m;
    aOccur[aMod[i]] += 1;
    if (aOccur[aMod[i]] >= k) {
      selectedValue = aMod[i];
      hasSolution = true;
    }
  }
  if (hasSolution) {
    int count = 0;
    printf("%s\n", "Yes");
    for (int i = 0; i < n; i++) {
      if (aMod[i] == selectedValue) {
        printf("%d ", a[i]);
        count += 1;
      }
      if (count == k) {
        break;
      }
    }
  } else {
    printf("%s", "No");
  }
  return 0;
}
