#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 1;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    int a[n];
    map<int, vector<int>> mp;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i < n; i++) {
      mp[(a[i] + k) % k].push_back(a[i]);
    }
    int f = 0;
    for (auto it : mp) {
      if (it.second.size() >= m) {
        f = 1;
        cout << "Yes" << endl;
        for (int i = 0; i < m; i++) {
          cout << it.second[i] << " ";
        }
        cout << endl;
        break;
      }
    }
    if (!f) {
      cout << "No" << endl;
    }
  }
  return 0;
}
