#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
long long a[N];
long long vis[N];
long long b[N];
int main() {
  int n, k, m, index, flag;
  while (scanf("%d%d%d", &n, &k, &m) != EOF) {
    memset(vis, 0, sizeof(vis));
    for (int i = 1; i <= n; i++) {
      scanf("%I64d", &a[i]);
      b[i] = a[i] % m;
      vis[b[i]]++;
    }
    for (int i = 0; i < m; i++) {
      flag = 0;
      if (vis[i] >= k) {
        index = 0;
        printf("Yes\n");
        for (int j = 1; j <= n; j++) {
          if (b[j] == i) {
            if (index++)
              printf(" %I64d", a[j]);
            else
              printf("%I64d", a[j]);
          }
          if (index == k) {
            flag = 1;
            printf("\n");
            break;
          }
        }
      }
      if (flag) break;
    }
    if (!flag) printf("No\n");
  }
  return 0;
}
