#include <bits/stdc++.h>
using namespace std;
long long n, k, m;
long long a[100005];
long long b[100005];
long long mds[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k >> m;
  for (long long i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    a[i] = x;
    mds[x % m]++;
    b[i] = x % m;
  }
  bool f = false;
  for (long long i = 0; i < m; i++) {
    if (mds[i] >= k) {
      cout << "Yes\n";
      f = true;
      for (long long j = 1; j <= n; j++) {
        if (b[j] == i && k) {
          cout << a[j] << " ";
          k--;
        }
      }
      return 0;
    }
  }
  cout << "No\n";
  return 0;
}
