#include <bits/stdc++.h>
using namespace std;
const int Z = (int)1e5 + 111;
const int inf = (int)1e9 + 111;
const long long llinf = (long long)1e18 + 5;
const int MOD = (int)1e9 + 7;
int a[Z];
int main() {
  srand(time(0));
  map<int, vector<int> > mp;
  int n, m, k;
  cin >> n >> k >> m;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    mp[a[i] % m].push_back(a[i]);
  }
  for (int i = 1; i <= n; ++i) {
    if ((int)mp[a[i] % m].size() >= k) {
      cout << "Yes\n";
      for (int j = 0; j < k; ++j) {
        printf("%d ", mp[a[i] % m][j]);
      }
      return 0;
    }
  }
  cout << "No";
  return 0;
}
