#include <bits/stdc++.h>
using namespace std;
const long double E = 2.71828182845904523536;
const long double pi = acos(-1);
const double eps = 1e-9;
const long long mod = 1e9 + 7;
const long long inf = 1LL << 30;
const int N = 100100;
vector<int> ans[N];
int a[N];
int main() {
  int n, k, m;
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    ans[a[i] % m].push_back(a[i]);
  }
  for (int x = 0; x < m; x++) {
    if (ans[x].size() < k) continue;
    printf("Yes\n");
    for (int i = 0; i < k; i++) printf("%d ", ans[x][i]);
    return 0;
  }
  printf("No");
  return 0;
}
