#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int N = 1e5 + 9;
const int shift = 1e3 + 9;
const double Eps = 1e-7;
int n, k, m, d;
vector<int> v[N];
int main(void) {
  if (fopen("in", "r") != NULL) {
    freopen("in", "r", stdin);
    freopen("out", "w", stdout);
  }
  while (cin >> n >> k >> m) {
    int flag = 1;
    memset(v, 0, sizeof v);
    for (int i = 0; i < n; i++) {
      scanf("%d", &d);
      v[d % m].push_back(d);
    }
    for (int i = 0; i < m; i++) {
      if (v[i].size() >= k) {
        printf("Yes\n");
        for (int j = 0; j < k; j++)
          printf("%d%c", v[i][j], j == k - 1 ? '\n' : ' ');
        flag = 0;
        break;
      }
    }
    if (flag) printf("No\n");
  }
  return 0;
}
