#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int n, k, m;
  cin >> n >> k >> m;
  vector<vector<int> > vec(m + 1);
  int arr[n];
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    arr[i] = a;
    vec[a % m].push_back(i);
  }
  for (int i = 0; i <= m; i++) {
    if (vec[i].size() >= k) {
      cout << "Yes" << endl;
      cout << arr[vec[i][0]];
      for (int j = 1; j < k; j++) cout << ' ' << arr[vec[i][j]];
      return 0;
    }
  }
  cout << "No";
  return 0;
}
