/**
	*In the name of Lord Hanuman
**/

#include<bits/stdc++.h>
using namespace std;
#define int                         long long
#define in(a)                       int a; cin>>a;
#define in2(a,b)                    int a,b; cin>>a>>b;
#define in3(a,b,c)                  int a,b,c; cin>>a>>b>>c;
#define in4(a,b,c,d)                int a,b,c,d; cin>>a>>b>>c>>d;
#define in5(a,b,c,d,e)              int a,b,c,d,e; cin>>a>>b>>c>>d>>e;
#define lelo(b)                     for(auto &i:b)cin>>i;
#define ff                          first
#define ss                          second
#define call(v)                     v.begin(),v.end()
#define rall(v)                     v.rbegin(),v.rend()
#define show(x)                     for(auto t:x)cout<<t<<" ";
#define deb(x)                      cout<<#x<<" "<<x<<endl;
#define pb                          push_back
#define fill(s,v)                   memset(s,v,sizeof(s))
#define endl                        "\n"
#define ce(x)                       cout<<x<<"\n";
#define nl                          cout<<endl;
#define jaldi                       ios_base::sync_with_stdio(false);cin.tie(NULL);
#define	dekh_lo						ce("dekh_lo");

typedef pair<int,int> pii;
typedef vector<pii> vii;
typedef vector<int> vi;

const int dx[4] = {-1,0,1,0};
const int dy[4] = {0,-1,0,1};
const int dxx[] = {1,1,0,-1,-1,-1,0,1};
const int dyy[] = {0,1,1,1,0,-1,-1,-1};
// string s=std::bitset<8>(cur).to_string();

#define error(args...){string _s=#args;replace(_s.begin(),_s.end(),',',' ');stringstream _ss(_s);istream_iterator<string>_it(_ss);err(_it,args);}
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    err(++it, args...);
}

int gcd(int a,int b){if(!b)return a;return gcd(b,a%b);}
int lcm(int a, int b){return (a*b)/gcd(a, b);}
int modexpo(int x,int n,int M){
    if(n==0)return 1;
    else if(n%2 == 0)return modexpo((x*x)%M,n/2,M);
    else return(x*modexpo((x*x)%M,(n-1)/2,M))%M;
}
int bexpo(int x,int n){
    if(n==0)return 1;
    else if(n%2==0)return bexpo(x*x,n/2);
    else return x*bexpo(x*x,(n-1)/2);
}
bool isPrime(int n){if(n<=1)
    return false; if(n<=3) return true; if(n%2==0 || n%3==0)return false;
    for(int i=5;i*i<=n;i=i+6)if(n%i==0 || n%(i+2)==0)return false;return true;
}

const int mod=1e9+7;
const int N=4e5+5;
const int INF=1e18;

void solve(){
	in3(n,m,k);

	vi a(n); lelo(a);

	map<int,int> mp;
	for(auto i:a){
		mp[i]++;
	}

	for (int i = 0; i < n; ++i)
	{
		/* code */
		int t=k+a[i];
		int d=a[i]-k;
		// error(a[i],t);

		if(mp.count(t)){
			if(mp[a[i]]+mp[t]>=m){
				ce("YES");
				// cout<<"madhe "<<a[i]<<endl;
				mp[a[i]]=min(mp[a[i]],m-1);

				for (int j = 0; j < mp[a[i]]; ++j)
				{
					/* code */
					cout<<a[i]<<" ";
				}
				int remain=m-mp[a[i]];
				// deb(remain);
				for (int j = 0; j < remain; ++j)
				{
					/* code */
					cout<<t<<" ";
				}
				return;
			}
		}

		if(mp.count(d)){
			if(mp[a[i]]+mp[t]>=m){
				ce("YES");
				mp[a[i]]=min(mp[a[i]],m-1);
				for (int j = 0; j < mp[a[i]]; ++j)
				{
					/* code */
					cout<<a[i]<<" ";
				}
				int remain=m-mp[a[i]];
				for (int j = 0; j < remain; ++j)
				{
					/* code */
					cout<<t<<" ";
				}
				return;
			}
		}
	}
	ce("NO");
}

int32_t main(){
    // jaldi
    int t;
    // cin>>t;
    t=1;
    while(t--){
        solve();
    }
}
/*
 # Stuff you should care about
 * watch the constraints estimate the solution
 * estimate the time complexity of your program
 * check n==0/n==1/vectors_bounds when something is zero/equal
 * ask to yourself whhat exactly the setter wants
 * think deeply your solution and than code it
 * Can't think of it ? maybe there is a simple hidden trick/pattern
 * Do something instead of nothing
*/


/**
	*In the name of Lord Hanuman
**/

#include<bits/stdc++.h>
using namespace std;
#define int                         long long
#define in(a)                       int a; cin>>a;
#define in2(a,b)                    int a,b; cin>>a>>b;
#define in3(a,b,c)                  int a,b,c; cin>>a>>b>>c;
#define in4(a,b,c,d)                int a,b,c,d; cin>>a>>b>>c>>d;
#define in5(a,b,c,d,e)              int a,b,c,d,e; cin>>a>>b>>c>>d>>e;
#define lelo(b)                     for(auto &i:b)cin>>i;
#define ff                          first
#define ss                          second
#define call(v)                     v.begin(),v.end()
#define rall(v)                     v.rbegin(),v.rend()
#define show(x)                     for(auto t:x)cout<<t<<" ";
#define deb(x)                      cout<<#x<<" "<<x<<endl;
#define pb                          push_back
#define fill(s,v)                   memset(s,v,sizeof(s))
#define endl                        "\n"
#define ce(x)                       cout<<x<<"\n";
#define nl                          cout<<endl;
#define jaldi                       ios_base::sync_with_stdio(false);cin.tie(NULL);
#define	dekh_lo						ce("dekh_lo");

typedef pair<int,int> pii;
typedef vector<pii> vii;
typedef vector<int> vi;

const int dx[4] = {-1,0,1,0};
const int dy[4] = {0,-1,0,1};
const int dxx[] = {1,1,0,-1,-1,-1,0,1};
const int dyy[] = {0,1,1,1,0,-1,-1,-1};
// string s=std::bitset<8>(cur).to_string();

#define error(args...){string _s=#args;replace(_s.begin(),_s.end(),',',' ');stringstream _ss(_s);istream_iterator<string>_it(_ss);err(_it,args);}
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    err(++it, args...);
}

int gcd(int a,int b){if(!b)return a;return gcd(b,a%b);}
int lcm(int a, int b){return (a*b)/gcd(a, b);}
int modexpo(int x,int n,int M){
    if(n==0)return 1;
    else if(n%2 == 0)return modexpo((x*x)%M,n/2,M);
    else return(x*modexpo((x*x)%M,(n-1)/2,M))%M;
}
int bexpo(int x,int n){
    if(n==0)return 1;
    else if(n%2==0)return bexpo(x*x,n/2);
    else return x*bexpo(x*x,(n-1)/2);
}
bool isPrime(int n){if(n<=1)
    return false; if(n<=3) return true; if(n%2==0 || n%3==0)return false;
    for(int i=5;i*i<=n;i=i+6)if(n%i==0 || n%(i+2)==0)return false;return true;
}

const int mod=1e9+7;
const int N=4e5+5;
const int INF=1e18;

void solve(){
	in3(n,k,m);

	vi a(n); lelo(a);
	// vi rem(n);

	// for (int i = 0; i < n; ++i)
	// {
	// 	/* code */
	// 	int t=a[i]%m;
	// 	rem=t;
	// }

	vi ss[m];

	for (int i = 0; i < n; ++i)
	{
		/* code */
		int t=a[i]%m;
		ss[t].pb(a[i]);
	}

	// for (int i = 0; i <= m-1; ++i)
	// {
	// 	/* code */
	// 	cout<<"rem kinta hai ->"<<i<<endl;
	// 	for (int j = 0; j < ss[i].size(); ++j)
	// 	{
	// 		/* code */
	// 		cout<<ss[i][j]<<" ";
	// 	}
	// 	nl
	// }

	for (int i = 0; i < n; ++i)
	{
		/* code */
		if(ss[i].size()>=k){
			ce("Yes");
			for (int j = 0; j < k; ++j)
			{
				/* code */
				cout<<ss[i][j]<<" ";
			}
			return;
		}
	}

	ce("No");
}

int32_t main(){
    // jaldi
    int t;
    // cin>>t;
    t=1;
    while(t--){
        solve();
    }
}
/*
 # Stuff you should care about
 * watch the constraints estimate the solution
 * estimate the time complexity of your program
 * check n==0/n==1/vectors_bounds when something is zero/equal
 * ask to yourself whhat exactly the setter wants
 * think deeply your solution and than code it
 * Can't think of it ? maybe there is a simple hidden trick/pattern
 * Do something instead of nothing
*/


/**
	*In the name of Lord Hanuman
**/

#include<bits/stdc++.h>
using namespace std;
#define int                         long long
#define in(a)                       int a; cin>>a;
#define in2(a,b)                    int a,b; cin>>a>>b;
#define in3(a,b,c)                  int a,b,c; cin>>a>>b>>c;
#define in4(a,b,c,d)                int a,b,c,d; cin>>a>>b>>c>>d;
#define in5(a,b,c,d,e)              int a,b,c,d,e; cin>>a>>b>>c>>d>>e;
#define lelo(b)                     for(auto &i:b)cin>>i;
#define ff                          first
#define ss                          second
#define call(v)                     v.begin(),v.end()
#define rall(v)                     v.rbegin(),v.rend()
#define show(x)                     for(auto t:x)cout<<t<<" ";
#define deb(x)                      cout<<#x<<" "<<x<<endl;
#define pb                          push_back
#define fill(s,v)                   memset(s,v,sizeof(s))
#define endl                        "\n"
#define ce(x)                       cout<<x<<"\n";
#define nl                          cout<<endl;
#define jaldi                       ios_base::sync_with_stdio(false);cin.tie(NULL);
#define	dekh_lo						ce("dekh_lo");

typedef pair<int,int> pii;
typedef vector<pii> vii;
typedef vector<int> vi;

const int dx[4] = {-1,0,1,0};
const int dy[4] = {0,-1,0,1};
const int dxx[] = {1,1,0,-1,-1,-1,0,1};
const int dyy[] = {0,1,1,1,0,-1,-1,-1};
// string s=std::bitset<8>(cur).to_string();

#define error(args...){string _s=#args;replace(_s.begin(),_s.end(),',',' ');stringstream _ss(_s);istream_iterator<string>_it(_ss);err(_it,args);}
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    err(++it, args...);
}

int gcd(int a,int b){if(!b)return a;return gcd(b,a%b);}
int lcm(int a, int b){return (a*b)/gcd(a, b);}
int modexpo(int x,int n,int M){
    if(n==0)return 1;
    else if(n%2 == 0)return modexpo((x*x)%M,n/2,M);
    else return(x*modexpo((x*x)%M,(n-1)/2,M))%M;
}
int bexpo(int x,int n){
    if(n==0)return 1;
    else if(n%2==0)return bexpo(x*x,n/2);
    else return x*bexpo(x*x,(n-1)/2);
}
bool isPrime(int n){if(n<=1)
    return false; if(n<=3) return true; if(n%2==0 || n%3==0)return false;
    for(int i=5;i*i<=n;i=i+6)if(n%i==0 || n%(i+2)==0)return false;return true;
}

const int mod=1e9+7;
const int N=4e5+5;
const int INF=1e18;

void solve(){
	in3(n,m,k);

	vi a(n); lelo(a);

	map<int,int> mp;
	for(auto i:a){
		mp[i]++;
	}

	for (int i = 0; i < n; ++i)
	{
		/* code */
		int t=k+a[i];
		int d=a[i]-k;
		// error(a[i],t);

		if(mp.count(t)){
			if(mp[a[i]]+mp[t]>=m){
				ce("Yes");
				// cout<<"madhe "<<a[i]<<endl;
				mp[a[i]]=min(mp[a[i]],m-1);

				for (int j = 0; j < mp[a[i]]; ++j)
				{
					/* code */
					cout<<a[i]<<" ";
				}
				int remain=m-mp[a[i]];
				// deb(remain);
				for (int j = 0; j < remain; ++j)
				{
					/* code */
					cout<<t<<" ";
				}
				return;
			}
		}

		if(mp.count(d)){
			if(mp[a[i]]+mp[t]>=m){
				ce("Yes");
				mp[a[i]]=min(mp[a[i]],m-1);
				for (int j = 0; j < mp[a[i]]; ++j)
				{
					/* code */
					cout<<a[i]<<" ";
				}
				int remain=m-mp[a[i]];
				for (int j = 0; j < remain; ++j)
				{
					/* code */
					cout<<t<<" ";
				}
				return;
			}
		}
	}
	ce("No");
}

int32_t main(){
    // jaldi
    int t;
    // cin>>t;
    t=1;
    while(t--){
        solve();
    }
}
/*
 # Stuff you should care about
 * watch the constraints estimate the solution
 * estimate the time complexity of your program
 * check n==0/n==1/vectors_bounds when something is zero/equal
 * ask to yourself whhat exactly the setter wants
 * think deeply your solution and than code it
 * Can't think of it ? maybe there is a simple hidden trick/pattern
 * Do something instead of nothing
*/


/**
	*In the name of Lord Hanuman
**/

#include<bits/stdc++.h>
using namespace std;
#define int                         long long
#define in(a)                       int a; cin>>a;
#define in2(a,b)                    int a,b; cin>>a>>b;
#define in3(a,b,c)                  int a,b,c; cin>>a>>b>>c;
#define in4(a,b,c,d)                int a,b,c,d; cin>>a>>b>>c>>d;
#define in5(a,b,c,d,e)              int a,b,c,d,e; cin>>a>>b>>c>>d>>e;
#define lelo(b)                     for(auto &i:b)cin>>i;
#define ff                          first
#define ss                          second
#define call(v)                     v.begin(),v.end()
#define rall(v)                     v.rbegin(),v.rend()
#define show(x)                     for(auto t:x)cout<<t<<" ";
#define deb(x)                      cout<<#x<<" "<<x<<endl;
#define pb                          push_back
#define fill(s,v)                   memset(s,v,sizeof(s))
#define endl                        "\n"
#define ce(x)                       cout<<x<<"\n";
#define nl                          cout<<endl;
#define jaldi                       ios_base::sync_with_stdio(false);cin.tie(NULL);
#define	dekh_lo						ce("dekh_lo");

typedef pair<int,int> pii;
typedef vector<pii> vii;
typedef vector<int> vi;

const int dx[4] = {-1,0,1,0};
const int dy[4] = {0,-1,0,1};
const int dxx[] = {1,1,0,-1,-1,-1,0,1};
const int dyy[] = {0,1,1,1,0,-1,-1,-1};
// string s=std::bitset<8>(cur).to_string();

#define error(args...){string _s=#args;replace(_s.begin(),_s.end(),',',' ');stringstream _ss(_s);istream_iterator<string>_it(_ss);err(_it,args);}
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    err(++it, args...);
}

int gcd(int a,int b){if(!b)return a;return gcd(b,a%b);}
int lcm(int a, int b){return (a*b)/gcd(a, b);}
int modexpo(int x,int n,int M){
    if(n==0)return 1;
    else if(n%2 == 0)return modexpo((x*x)%M,n/2,M);
    else return(x*modexpo((x*x)%M,(n-1)/2,M))%M;
}
int bexpo(int x,int n){
    if(n==0)return 1;
    else if(n%2==0)return bexpo(x*x,n/2);
    else return x*bexpo(x*x,(n-1)/2);
}
bool isPrime(int n){if(n<=1)
    return false; if(n<=3) return true; if(n%2==0 || n%3==0)return false;
    for(int i=5;i*i<=n;i=i+6)if(n%i==0 || n%(i+2)==0)return false;return true;
}

const int mod=1e9+7;
const int N=4e5+5;
const int INF=1e18;

void solve(){
	in3(n,k,m);

	vi a(n); lelo(a);

	vi ss[m];

	for (int i = 0; i < n; ++i)
	{
		/* code */
		int t=a[i]%m;
		ss[t].pb(a[i]);
	}

	// for (int i = 0; i <= m-1; ++i)
	// {
	// 	/* code */
	// 	cout<<"rem kinta hai ->"<<i<<endl;
	// 	for (int j = 0; j < ss[i].size(); ++j)
	// 	{
	// 		/* code */
	// 		cout<<ss[i][j]<<" ";
	// 	}
	// 	nl
	// }

	for (int i = 0; i <= m-1; ++i)
	{
		/* code */
		if(ss[i].size()>=k){
			ce("Yes");
			for (int j = 0; j < k; ++j)
			{
				/* code */
				cout<<ss[i][j]<<" ";
			}
			return;
		}
	}

	ce("No");
}

int32_t main(){
    // jaldi
    int t;
    // cin>>t;
    t=1;
    while(t--){
        solve();
    }
}
/*
 # Stuff you should care about
 * watch the constraints estimate the solution
 * estimate the time complexity of your program
 * check n==0/n==1/vectors_bounds when something is zero/equal
 * ask to yourself whhat exactly the setter wants
 * think deeply your solution and than code it
 * Can't think of it ? maybe there is a simple hidden trick/pattern
 * Do something instead of nothing
*/


/**
	*In the name of Lord Hanuman
**/

#include<bits/stdc++.h>
using namespace std;
#define int                         long long
#define in(a)                       int a; cin>>a;
#define in2(a,b)                    int a,b; cin>>a>>b;
#define in3(a,b,c)                  int a,b,c; cin>>a>>b>>c;
#define in4(a,b,c,d)                int a,b,c,d; cin>>a>>b>>c>>d;
#define in5(a,b,c,d,e)              int a,b,c,d,e; cin>>a>>b>>c>>d>>e;
#define lelo(b)                     for(auto &i:b)cin>>i;
#define ff                          first
#define ss                          second
#define call(v)                     v.begin(),v.end()
#define rall(v)                     v.rbegin(),v.rend()
#define show(x)                     for(auto t:x)cout<<t<<" ";
#define deb(x)                      cout<<#x<<" "<<x<<endl;
#define pb                          push_back
#define fill(s,v)                   memset(s,v,sizeof(s))
#define endl                        "\n"
#define ce(x)                       cout<<x<<"\n";
#define nl                          cout<<endl;
#define jaldi                       ios_base::sync_with_stdio(false);cin.tie(NULL);
#define	dekh_lo						ce("dekh_lo");

typedef pair<int,int> pii;
typedef vector<pii> vii;
typedef vector<int> vi;

const int dx[4] = {-1,0,1,0};
const int dy[4] = {0,-1,0,1};
const int dxx[] = {1,1,0,-1,-1,-1,0,1};
const int dyy[] = {0,1,1,1,0,-1,-1,-1};
// string s=std::bitset<8>(cur).to_string();

#define error(args...){string _s=#args;replace(_s.begin(),_s.end(),',',' ');stringstream _ss(_s);istream_iterator<string>_it(_ss);err(_it,args);}
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    err(++it, args...);
}

int gcd(int a,int b){if(!b)return a;return gcd(b,a%b);}
int lcm(int a, int b){return (a*b)/gcd(a, b);}
int modexpo(int x,int n,int M){
    if(n==0)return 1;
    else if(n%2 == 0)return modexpo((x*x)%M,n/2,M);
    else return(x*modexpo((x*x)%M,(n-1)/2,M))%M;
}
int bexpo(int x,int n){
    if(n==0)return 1;
    else if(n%2==0)return bexpo(x*x,n/2);
    else return x*bexpo(x*x,(n-1)/2);
}
bool isPrime(int n){if(n<=1)
    return false; if(n<=3) return true; if(n%2==0 || n%3==0)return false;
    for(int i=5;i*i<=n;i=i+6)if(n%i==0 || n%(i+2)==0)return false;return true;
}

const int mod=1e9+7;
const int N=4e5+5;
const int INF=1e18;

void solve(){
	in3(n,m,k);

	vi a(n); lelo(a);

	map<int,int> mp;
	for(auto i:a){
		mp[i]++;
	}

	for (int i = 0; i < n; ++i)
	{
		/* code */
		int t=k+a[i];
		// int d=a[i]-k;
		// error(a[i],t);

		if(mp.count(t)){
			if(mp[a[i]]+mp[t]>=m){
				ce("Yes");
				// cout<<"madhe "<<a[i]<<endl;
				mp[a[i]]=min(mp[a[i]],m-1);

				for (int j = 0; j < mp[a[i]]; ++j)
				{
					/* code */
					cout<<a[i]<<" ";
				}
				int remain=m-mp[a[i]];
				// deb(remain);
				for (int j = 0; j < remain; ++j)
				{
					/* code */
					cout<<t<<" ";
				}
				return;
			}
		}

		// if(mp.count(d)){
		// 	if(mp[a[i]]+mp[t]>=m){
		// 		ce("Yes");
		// 		mp[a[i]]=min(mp[a[i]],m-1);
		// 		for (int j = 0; j < mp[a[i]]; ++j)
		// 		{
		// 			/* code */
		// 			cout<<a[i]<<" ";
		// 		}
		// 		int remain=m-mp[a[i]];
		// 		for (int j = 0; j < remain; ++j)
		// 		{
		// 			/* code */
		// 			cout<<t<<" ";
		// 		}
		// 		return;
		// 	}
		// }
	}
	ce("No");
}

int32_t main(){
    // jaldi
    int t;
    // cin>>t;
    t=1;
    while(t--){
        solve();
    }
}
/*
 # Stuff you should care about
 * watch the constraints estimate the solution
 * estimate the time complexity of your program
 * check n==0/n==1/vectors_bounds when something is zero/equal
 * ask to yourself whhat exactly the setter wants
 * think deeply your solution and than code it
 * Can't think of it ? maybe there is a simple hidden trick/pattern
 * Do something instead of nothing
*/


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
enum { };

int main() {
	ios::sync_with_stdio(false); cin.tie(0);
	int n, k, m; cin >> n >> k >> m;
	vector<int> a(n);
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	string ans = "No";
	vector<int> res;
	unordered_map<int,int> f;
	for (auto ai : a) {
		++f[ai%m];
		if (f[ai%m] >= k) {
			ans = "Yes";
			for (int i = 0; i < n && k > 0; ++i) {
				if (a[i]%m == ai%m) {
					res.push_back(a[i]);
					--k;
				}
			}
			break;
		}
	}
	cout << ans << '\n';
	for (auto ai : res) {
		cout << ai << ' ';
	}
	cout << '\n';
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
enum { };

int main() {
	ios::sync_with_stdio(false); cin.tie(0);
	int n, k, m; cin >> n >> k >> m;
	vector<int> a(n);
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	sort(a.begin(), a.end());
	string ans = "No";
	vector<int> res;
	unordered_map<int,int> f, u;
	for (auto ai : a) {
		++f[ai];
		u[ai] = f[ai];
		if (ai >= m) {
			u[ai] += u[ai-m];
		}
		if (u[ai] >= k) {
			ans = "Yes";
			int j = ai, cnt = k;
			while (j >= 0 && cnt > 0) {
				if (f.count(j)) {
					for (int i = 0; i < f[j] && cnt > 0; ++i, --cnt) {
						res.push_back(j);
					}
				}
				j -= m;
			}
			break;
		}
	}
	cout << ans << '\n';
	for (auto ai : res) {
		cout << ai << ' ';
	}
	cout << '\n';
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
enum { };

int main() {
	ios::sync_with_stdio(false); cin.tie(0);
	int n, k, m; cin >> n >> k >> m;
	vector<int> a(n);
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	string ans = "No";
	vector<int> res;
	unordered_map<int,int> f;
	for (auto ai : a) {
		++f[ai%m];
		if (f[ai%m] >= k) {
			ans = "Yes";
			for (int i = 0; i < n && k > 0; ++i, --k) {
				if (a[i]%m == ai%m) {
					res.push_back(a[i]);
				}
			}
			break;
		}
	}
	cout << ans << '\n';
	for (auto ai : res) {
		cout << ai << ' ';
	}
	cout << '\n';
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	ios::sync_with_stdio(false); cin.tie(0);
	int n, k, m; cin >> n >> k >> m;
	vector<int> a(n);
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	string ans = "No";
	vector<int> res;
	unordered_map<int,int> f;
	for (auto ai : a) {
		int mi = ai%m;
		++f[mi];
		if (f[mi] >= k) {
			ans = "Yes";
			for (int i = 0; i < n && k > 0; ++i) {
				if (a[i]%m == mi) {
					res.push_back(a[i]);
					--k;
				}
			}
			break;
		}
	}
	cout << ans << '\n';
	for (auto ai : res) {
		cout << ai << ' ';
	}
	cout << '\n';
	return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

int a[201314];
int b[201314];
int n,k,m;

int main()
{

    cin>>n>>k>>m;

    for(int i=0; i<n; i++)
    {
        cin>>a[i];
        b[i]=a[i]%m;
    }

    sort(b,b+n);
    int ans=b[0],num=1,t=1;
    for(int i=1; i<n; i++)
    {
        if(b[i]==b[i-1])
            t++;
        else
        {
            if(t>num)
            {
                num=t;
                t=1;
                ans=b[i-1];
            }
        }
    }
    if(t>num)
    {
        num=t;
        t=1;
        ans=b[n-1];
    }
   // cout<<ans<<" "<<num<<endl;
    int kk=0;
    if(num>=k)
    {
        int flag=0;
        cout<<"Yes"<<endl;
        for(int i=0; i<n; i++)
        {
            if(a[i]%m==ans)
            {
                if(flag==0)
                {
                    cout<<a[i];
                    kk++;
                    flag=1;
                }
                else
                {
                    cout<<" "<<a[i];
                    kk++;
                }
            }
            if(kk==k)
                break;
        }
    }
    else
        cout<<"No"<<endl;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

int a[201314];
int b[201314];
int n,k,m;

int main()
{

    cin>>n>>k>>m;

    for(int i=0; i<n; i++)
    {
        cin>>a[i];
        b[i]=a[i]%m;
    }

    sort(b,b+n);
    int ans=b[0],num=1,t=1;
    for(int i=0;i<n;i++)
        cout<<b[i];
    cout<<endl;
    for(int i=1; i<n; i++)
    {
        if(b[i]==b[i-1])
            t++;
        else
        {
            cout<<t<<endl;
            if(t>num)
            {
                num=t;
                ans=b[i-1];
              //  cout<<ans<<num<<endl;
            }
            t=1;
        }
    }
    if(t>num)
    {
        //cout<<"fefe"<<endl;
        num=t;
        t=1;
        ans=b[n-1];
    }
   //cout<<ans<<" "<<num<<endl;
    int kk=0;
    if(num>=k)
    {
        int flag=0;
        cout<<"Yes"<<endl;
        for(int i=0; i<n; i++)
        {
            if(a[i]%m==ans)
            {
                if(flag==0)
                {
                    cout<<a[i];
                    kk++;
                    flag=1;
                }
                else
                {
                    cout<<" "<<a[i];
                    kk++;
                }
            }
            if(kk==k)
                break;
        }
    }
    else
        cout<<"No"<<endl;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

int a[201314];
int b[201314];
int n,k,m;

int main()
{

    cin>>n>>k>>m;

    for(int i=0; i<n; i++)
    {
        cin>>a[i];
        b[i]=a[i]%m;
    }

    sort(b,b+n);
    int ans=b[0],num=1,t=1;
    for(int i=0;i<n;i++)
        cout<<b[i];
    cout<<endl;
    for(int i=1; i<n; i++)
    {
        if(b[i]==b[i-1])
            t++;
        else
        {
            cout<<t<<endl;
            if(t>num)
            {
                num=t;
                ans=b[i-1];
              //  cout<<ans<<num<<endl;
            }
            t=1;
        }
    }
    if(t>num)
    {
        //cout<<"fefe"<<endl;
        num=t;
        t=1;
        ans=b[n-1];
    }
   cout<<ans<<" "<<num<<endl;
    int kk=0;
    if(num>=k)
    {
        int flag=0;
        cout<<"Yes"<<endl;
        for(int i=0; i<n; i++)
        {
            if(a[i]%m==ans)
            {
                if(flag==0)
                {
                    cout<<a[i];
                    kk++;
                    flag=1;
                }
                else
                {
                    cout<<" "<<a[i];
                    kk++;
                }
            }
            if(kk==k)
                break;
        }
    }
    else
        cout<<"No"<<endl;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

int a[201314];
int b[201314];
int n,k,m;

int main()
{

    cin>>n>>k>>m;

    for(int i=0; i<n; i++)
    {
        cin>>a[i];
        b[i]=a[i]%m;
    }

    sort(b,b+n);
    int ans=b[0],num=1,t=1;
  //  for(int i=0;i<n;i++)
//cout<<b[i];
   // cout<<endl;
    for(int i=1; i<n; i++)
    {
        if(b[i]==b[i-1])
            t++;
        else
        {
           // cout<<t<<endl;
            if(t>num)
            {
                num=t;
                ans=b[i-1];
              //  cout<<ans<<num<<endl;
            }
            t=1;
        }
    }
    if(t>num)
    {
        //cout<<"fefe"<<endl;
        num=t;
        t=1;
        ans=b[n-1];
    }
   //cout<<ans<<" "<<num<<endl;
    int kk=0;
    if(num>=k)
    {
        int flag=0;
        cout<<"Yes"<<endl;
        for(int i=0; i<n; i++)
        {
            if(a[i]%m==ans)
            {
                if(flag==0)
                {
                    cout<<a[i];
                    kk++;
                    flag=1;
                }
                else
                {
                    cout<<" "<<a[i];
                    kk++;
                }
            }
            if(kk==k)
                break;
        }
    }
    else
        cout<<"No"<<endl;
}


#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef vector<long long> vl;
typedef vector<bool> vb;
#define int long long
typedef vector<int> vi;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define Maxn 4000007
const int INF = 1e9 + 5;
const int mod = 1e9 + 7;
const int  N = 2e5 + 314;
void foo(){
    int n, m, k, x=0, ok=1;
    cin>>n>>k>>m;
    vi v(n);
    map<int, int>sir;
    for(int i = 0; i < n; i++){
        cin>>v[i];
        sir[v[i]%m]++;
    }
    for(auto it:sir){
        if(it.s>=k){
            ok=0;
            x=it.f;
        }
    }
    if(ok){
        cout<<"No\n";
        return;
    }
    cout<<"Yes\n";
    for(int i = 0; i < n; i++){
        if(k==0)break;
        if(v[i]%m==x){
            k--;
            cout<<v[i]<<" ";
        }
    }
}
signed main(){
    speed;
    int t=1;
    //cin>>t;
    while(t--)foo();
}


#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef vector<long long> vl;
typedef vector<bool> vb;
#define int long long
typedef vector<int> vi;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define Maxn 4000007
const int INF = 1e9 + 5;
const int mod = 1e9 + 7;
const int  N = 2e5 + 314;
void foo(){
    int n, m, k, x=0, ok=1;
    cin>>n>>k>>m;
    vi v(n);
    map<int, int>sir;
    for(int i = 0; i < n; i++){
        cin>>v[i];
        sir[v[i]%m]++;
    }
    for(auto it:sir){
        if(it.s>=k){
            ok=0;
            x=it.f;
        }
    }
    if(ok){
        cout<<"No\n";
        return;
    }
    cout<<"Yes\n"
    for(int i = 0; i < n; i++){
        if(k==0)break;
        if(v[i]%m==x){
            k--;
            cout<<v[i]<<" ";
        }
    }
}
signed main(){
    speed;
    int t=1;
    //cin>>t;
    while(t--)foo();
}


#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
#define pb push_back
#define mp make_pair
#define ld long double
#define f first
#define s second
#define in insert
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e18 + 5;
const int mod = 1e9 + 7;
const int  N = 2e5 + 314;
const long double pi = 3.1415926535897932384626433832795;
void solve(){
    int n, k, m;
    cin>>n>>k>>m;
    vi v(n), a;
    map<int, int>u;
    int b=0;
    for(int i = 0; i < n; i++){
        cin>>v[i];
        u[v[i]%m]++;
    }
    for(int i = 0; i < n; i++){
        if(u[v[i]%m]>=k)b=v[i]%m;
        if(v[i]%m==b){
            if(sz(a)<k)a.pb(v[i]);
        }
    }
    sort(all(a));
    if(sz(a)<k){
        cout<<"No\n";
        return;
    }
    cout<<"Yes\n";
    for(auto i:a)cout<<i<<" ";
}
signed main(){
    speed;
    int t=1;
    //cin>>t;
    while(t--)solve();
}


#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
#define pb push_back
#define mp make_pair
#define ld long double
#define f first
#define s second
#define in insert
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e18 + 5;
const int mod = 1e9 + 7;
const int  N = 2e5 + 314;
const long double pi = 3.1415926535897932384626433832795;
void solve(){
    int n, k, m;
    cin>>n>>k>>m;
    vi v(n), a;
    map<int, int>u;
    int b=0;
    for(int i = 0; i < n; i++){
        cin>>v[i];
        u[v[i]%m]++;
    }
    for(int i = 0; i < n; i++){
        if(u[v[i]%m]>=k)b=v[i]%m;
        if(v[i]%m==b){
            if(sz(a)<k)a.pb(v[i]);
        }
    }
    if(!sz(a)){
        cout<<"No\n";
        return;
    }
    cout<<"Yes\n";
    for(auto i:a)cout<<i<<" ";
}
signed main(){
    speed;
    int t=1;
    //cin>>t;
    while(t--)solve();
}


#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef vector<long long> vl;
typedef vector<bool> vb;
#define int long long
typedef vector<int> vi;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define Maxn 4000007
const int INF = 1e9 + 5;
const int mod = 1e9 + 7;
const int  N = 2e5 + 314;
void foo(){
    int n, m, k, x=0;
    cin>>n>>m>>k;
    vi v(n);
    map<int, int>sir;
    for(int i = 0; i < n; i++){
        cin>>v[i];
        sir[v[i]%m]++;
    }
    for(auto it:sir){
        if(it.s>=k){
            cout<<"Yes\n";
            x=it.f;
        }
    }
    for(int i = 0; i < n; i++){
        if(k==0)break;
        if(v[i]%m==x){
            k--;
            cout<<v[i]<<" ";
        }
    }
}
signed main(){
    speed;
    int t=1;
    //cin>>t;
    while(t--)foo();
}


#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef vector<long long> vl;
typedef vector<bool> vb;
#define int long long
typedef vector<int> vi;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define Maxn 4000007
const int INF = 1e9 + 5;
const int mod = 1e9 + 7;
const int  N = 2e5 + 314;
void foo(){
    int n, k, m;
    cin>>n>>k>>m;
    vector<pii>v(n);
    map<int, int>c;
    map<int, int>div;
    for(int i = 0; i < n; i++){
        int x;
        cin>>x;
        v[i]={x, i};
        div[i]=x;
        v[i].f%=m;
        c[v[i].f]++;
    }
    sort(all(v));
    int  cnt = 0;
    for(int i = 0; i < m; i++){
        if(c[i]>=2)cnt+=c[i];
    }
    if(cnt<k){
        cout<<"No\n";
        return;
    }
    cout<<"Yes\n";
    for(int i = 0; i < n; i++){
        if(k==0)break;
        cout<<div[v[i].s]<<" ";
        k--;
    }
}
signed main(){
    speed;
    int t=1;
    //cin>>t;
    while(t--)foo();
}


#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
#define pb push_back
#define mp make_pair
#define ld long double
#define f first
#define s second
#define in insert
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e18 + 5;
const int mod = 1e9 + 7;
const int  N = 2e5 + 314;
const long double pi = 3.1415926535897932384626433832795;
void solve(){
    int n, k, m;
    cin>>n>>k>>m;
    vi v(n), a;
    map<int, int>u;
    int b=0;
    for(int i = 0; i < n; i++){
        cin>>v[i];
        u[v[i]%m]++;
    }
    for(int i = 0; i < n; i++){
        if(u[v[i]%m]>=k)b=v[i]%m;
        if(v[i]%m==b){
            if(sz(a)<k)a.pb(v[i]);
        }
    }
    if(sz(a)<k){
        cout<<"No\n";
        return;
    }
    cout<<"Yes\n";
    for(auto i:a)cout<<i<<" ";
}
signed main(){
    speed;
    int t=1;
    //cin>>t;
    while(t--)solve();
}


#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef vector<long long> vl;
typedef vector<bool> vb;
#define int long long
typedef vector<int> vi;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define Maxn 4000007
const int INF = 1e9 + 5;
const int mod = 1e9 + 7;
const int  N = 2e5 + 314;
void foo(){
    int n, m, k, x=0, ok=1;
    cin>>n>>k>>m;
    vi v(n);
    map<int, int>sir;
    for(int i = 0; i < n; i++){
        cin>>v[i];
        sir[v[i]%m]++;
    }
    for(auto it:sir){
        if(it.s>=k){
            ok=0;
            cout<<"Yes\n";
            x=it.f;
        }
    }
    if(ok){
        cout<<"No\n";
        return;
    }
    for(int i = 0; i < n; i++){
        if(k==0)break;
        if(v[i]%m==x){
            k--;
            cout<<v[i]<<" ";
        }
    }
}
signed main(){
    speed;
    int t=1;
    //cin>>t;
    while(t--)foo();
}


#include <iostream>
#include <algorithm>
#include <alg.h>
#include <vector>
#include <math.h>
#include <fstream>
#include <string>
#include <bitset>
#include <stack>
#include <map>
#include <set>
#include <iomanip>
#include <stdio.h>

using namespace std;

bool by_first(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
bool by_second(pair<int, int> a, pair<int, int> b) { return a.second < b.second; }

int n, k, m;

int main() {
	cin >> n >> k >> m;
	vector<vector<long long>> r(m);
	for (int i = 0; i < n; i++) {
		long long tmp;
		cin >> tmp;
		r[tmp % m].push_back(tmp);
	}
	bool found = false;
	for (int i = 0; i < m; i++) {
		if (r[i].size() >= k) {
			cout << "Yes\n";
			found = true;
			for (int j = 0; j < k; j++) cout << r[i][j] << ' ';
			break;
		}
	}
	if (!found) cout << "No";
}


#include <iostream>
#include <algorithm>
#include <alg.h>
#include <vector>
#include <math.h>
#include <fstream>
#include <string>
#include <bitset>
#include <stack>
#include <map>
#include <set>
#include <iomanip>
#include <stdio.h>

using namespace std;

bool by_first(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
bool by_second(pair<int, int> a, pair<int, int> b) { return a.second < b.second; }

int n, k, m;

int main() {
	cin >> n >> k >> m;
	vector<vector<long long>> r(m);
	for (int i = 0; i < n; i++) {
		long long tmp;
		cin >> tmp;
		r[tmp % m].push_back(tmp);
	}
	bool found = false;
	for (int i = 0; i < m; i++) {
		if (r[i].size() >= k) {
			cout << "Yes\n";
			found = true;
			for (int j = 0; j < k; j++) cout << r[i][j] << ' ';
		}
	}
	if (!found) cout << "No";
}


#include<iostream>
#include<vector>
using namespace std;
const int mmax = 100000 + 5;
vector<int>a[mmax];
int main() {
	int n, k, m;
	cin >> n >> k >> m;
	int temp;
	for (int i = 0; i < n; i += 1) {
		cin >> temp;
		a[temp % m].push_back(temp);
	}
	for (int i = 0; i < m; i += 1) {
		if (a[i].size() >= k) {
			cout << "Yes" << "\n";
			for (int j = 0; j < k; j += 1) {
				cout << a[i][j] << " ";
			}
			return 0;
		}
	}
	cout << "No" << "\n";
}


#include <iostream>
#include <vector>
#include <map>

using namespace std;

int main() {
    int n, k, m, x;
    map <int, vector <int>> a;
    cin >> n >> k >> m;
    vector <int> b(n);
    for (int i = 0; i < n; i++) {
        cin >> b[i];
        a[b[i] % m].push_back(b[i]);
        if (a[b[i] % m].size() == k) {
            cout << "Yes" << endl;
            for (auto &i : a[b[i] % m]) {
                cout << i << " ";
            }
            return 1;
        }
    }
    cout << "No";
    return 0;
}


#include <iostream>
#include <vector>
#include <map>

using namespace std;

int main() {
    int n, k, m, x;
    map <int, vector <int>> a;
    cin >> n >> k >> m;
    vector <int> b(n);
    for (int i = 0; i < n; i++) {
        cin >> b[i];
        a[b[i] % m].push_back(b[i]);
        if (a[b[i] % m].size() == k) {
            cout << "Yes" << endl;
            for (auto &i : a[b[i] % m]) {
                cout << i << " ";
            }
            return 0;
        }
    }
    cout << "No";
    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <numeric>
#include <functional>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <fstream>
using namespace std;

long long gcd(long long a, long long b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

long long gcd2(long long a, long long b, long long& x, long long& y) {
	if (a == 0) {
		x = 0; y = 1;
		return b;
	}
	long long x1, y1;
	long long d = gcd2(b%a, a, x1, y1);
	x = y1 - (b / a) * x1;
	y = x1;
	return d;
}
long long lcm(long long  a, long long  b) {
	return a * b / gcd(a, b);
}

int mod = 1000000007;

inline int add(int a, int b) {
	int ret = a + b;
	if (ret >= mod)
		ret -= mod;
	return ret;
}

bool find_any_solution(long long a, long long b, long long c, long long& x0, long long& y0, long long& g) {
	g = gcd2(abs(a), abs(b), x0, y0);
	if (c % g != 0)
		return false;
	x0 *= c / g;
	y0 *= c / g;
	if (a < 0)   x0 *= -1;
	if (b < 0)   y0 *= -1;
	return true;
}

void shift_solution(long long & x, long long & y, long long a, long long b, long long cnt) {
	x += cnt * b;
	y -= cnt * a;
}
const double pi = 3.14159265358979323846;
const int N = 1000001;

vector<int> q[1000001];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n, k, m, a;
	cin >> n >> k >> m;
	for (int i = 0; i < n; ++i) {
		cin >> a;
		q[a%m].push_back(a);
	}
	for (int i = 0; i < m; ++i) {
		if (q[i].size() >= k) {
			cout << "Yes\n";
			for (int j = 0, end = q[i].size(); j < end && k; ++j, --k) {
				cout << q[i][j] << " ";
			}
			return 0;
		}
	}
	cout << "No";
	/*system("pause");*/
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <numeric>
#include <functional>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <fstream>
using namespace std;

long long gcd(long long a, long long b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

long long gcd2(long long a, long long b, long long& x, long long& y) {
	if (a == 0) {
		x = 0; y = 1;
		return b;
	}
	long long x1, y1;
	long long d = gcd2(b%a, a, x1, y1);
	x = y1 - (b / a) * x1;
	y = x1;
	return d;
}
long long lcm(long long  a, long long  b) {
	return a * b / gcd(a, b);
}

int mod = 1000000007;

inline int add(int a, int b) {
	int ret = a + b;
	if (ret >= mod)
		ret -= mod;
	return ret;
}

bool find_any_solution(long long a, long long b, long long c, long long& x0, long long& y0, long long& g) {
	g = gcd2(abs(a), abs(b), x0, y0);
	if (c % g != 0)
		return false;
	x0 *= c / g;
	y0 *= c / g;
	if (a < 0)   x0 *= -1;
	if (b < 0)   y0 *= -1;
	return true;
}

void shift_solution(long long & x, long long & y, long long a, long long b, long long cnt) {
	x += cnt * b;
	y -= cnt * a;
}
const double pi = 3.14159265358979323846;
const int N = 1000001;

int q[1000001];
int arr[1000001];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n, k, m, a;
	cin >> n >> k >> m;
	for (int i = 0; i < n; ++i) {
		cin >> arr[i];
		q[arr[i] % m]++;
	}
	for (int i = 0; i < m; ++i) {
		if (q[i] >= k) {
			cout << "Yes";
			for (int i = 0; i < n && k; ++i) {
				if (arr[i] % m == i) {
					cout << arr[i] << " ";
					--k;
				}
			}
			return 0;
		}
	}
	cout << "No";
	/*system("pause");*/
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <numeric>
#include <functional>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <fstream>
using namespace std;

long long gcd(long long a, long long b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

long long gcd2(long long a, long long b, long long& x, long long& y) {
	if (a == 0) {
		x = 0; y = 1;
		return b;
	}
	long long x1, y1;
	long long d = gcd2(b%a, a, x1, y1);
	x = y1 - (b / a) * x1;
	y = x1;
	return d;
}
long long lcm(long long  a, long long  b) {
	return a * b / gcd(a, b);
}

int mod = 1000000007;

inline int add(int a, int b) {
	int ret = a + b;
	if (ret >= mod)
		ret -= mod;
	return ret;
}

bool find_any_solution(long long a, long long b, long long c, long long& x0, long long& y0, long long& g) {
	g = gcd2(abs(a), abs(b), x0, y0);
	if (c % g != 0)
		return false;
	x0 *= c / g;
	y0 *= c / g;
	if (a < 0)   x0 *= -1;
	if (b < 0)   y0 *= -1;
	return true;
}

void shift_solution(long long & x, long long & y, long long a, long long b, long long cnt) {
	x += cnt * b;
	y -= cnt * a;
}
const double pi = 3.14159265358979323846;
const int N = 1000001;

int q[1000001];
int arr[1000001];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n, k, m, a;
	cin >> n >> k >> m;
	for (int i = 0; i < n; ++i) {
		cin >> arr[i];
		q[arr[i] % m]++;
	}
	for (int j = 0; j < m; ++j) {
		if (q[j] >= k) {
			cout << "Yes\n";
			for (int i = 0; i < n && k; ++i) {
				if (arr[i] % m == j) {
					cout << arr[i] << " ";
					--k;
				}
			}
			return 0;
		}
	}
	cout << "No";
	/*system("pause");*/
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <numeric>
#include <functional>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <fstream>
using namespace std;

long long gcd(long long a, long long b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

long long gcd2(long long a, long long b, long long& x, long long& y) {
	if (a == 0) {
		x = 0; y = 1;
		return b;
	}
	long long x1, y1;
	long long d = gcd2(b%a, a, x1, y1);
	x = y1 - (b / a) * x1;
	y = x1;
	return d;
}
long long lcm(long long  a, long long  b) {
	return a * b / gcd(a, b);
}

int mod = 1000000007;

inline int add(int a, int b) {
	int ret = a + b;
	if (ret >= mod)
		ret -= mod;
	return ret;
}

bool find_any_solution(long long a, long long b, long long c, long long& x0, long long& y0, long long& g) {
	g = gcd2(abs(a), abs(b), x0, y0);
	if (c % g != 0)
		return false;
	x0 *= c / g;
	y0 *= c / g;
	if (a < 0)   x0 *= -1;
	if (b < 0)   y0 *= -1;
	return true;
}

void shift_solution(long long & x, long long & y, long long a, long long b, long long cnt) {
	x += cnt * b;
	y -= cnt * a;
}
const double pi = 3.14159265358979323846;
const int N = 1000001;

vector<int> q[1000001];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n, k, m, a;
	cin >> n >> k >> m;
	for (int i = 0; i < n; ++i) {
		cin >> a;
		q[a%m].push_back(a);
	}
	if (k <= 2) {
		cout << "Yes\n";
		for (int i = 0; i < m; ++i) {
			for (int j = 0, end = q[i].size(); j < end && k; ++j, --k) {
				cout << q[i][j] << " ";
			}
		}
		return 0;
	}
	else {
		for (int i = 0; i < m; ++i) {
			if (q[i].size() >= k) {
				cout << "Yes\n";
				for (int j = 0, end = q[i].size(); j < end && k; ++j, --k) {
					cout << q[i][j] << " ";
				}
				return 0;
			}
		}
	}
	cout << "No";
	/*system("pause");*/
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <numeric>
#include <functional>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <fstream>
using namespace std;

long long gcd(long long a, long long b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

long long gcd2(long long a, long long b, long long& x, long long& y) {
	if (a == 0) {
		x = 0; y = 1;
		return b;
	}
	long long x1, y1;
	long long d = gcd2(b%a, a, x1, y1);
	x = y1 - (b / a) * x1;
	y = x1;
	return d;
}
long long lcm(long long  a, long long  b) {
	return a * b / gcd(a, b);
}

int mod = 1000000007;

inline int add(int a, int b) {
	int ret = a + b;
	if (ret >= mod)
		ret -= mod;
	return ret;
}

bool find_any_solution(long long a, long long b, long long c, long long& x0, long long& y0, long long& g) {
	g = gcd2(abs(a), abs(b), x0, y0);
	if (c % g != 0)
		return false;
	x0 *= c / g;
	y0 *= c / g;
	if (a < 0)   x0 *= -1;
	if (b < 0)   y0 *= -1;
	return true;
}

void shift_solution(long long & x, long long & y, long long a, long long b, long long cnt) {
	x += cnt * b;
	y -= cnt * a;
}
const double pi = 3.14159265358979323846;
const int N = 1000001;

vector<int> q[1000001];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n, k, m, a;
	cin >> n >> k >> m;
	for (int i = 0; i < n; ++i) {
		cin >> a;
		q[a%m].push_back(a);
	}
	for (int i = 0; i < m; ++i) {
		if (q[i].size() >= k || k <= 2) {
			cout << "Yes\n";
			for (int j = 0, end = q[i].size(); j < end && k; ++j, --k) {
				cout << q[i][j] << " ";
			}
			return 0;
		}
	}
	cout << "No";
	/*system("pause");*/
	return 0;
}


#include <iostream>
#include <map>
using namespace std;

int main()
{
	int n, k, m, x;
	cin >> n >> k >> m;
	map<int,int>A;
	for (int i = 0; i < n; i++)
		cin >> x, A[x]++;
	for (auto it = A.begin(); it != A.end(); it++)
		if (it->second >= k - 1)
			for (auto it2 = A.begin(); it2 != A.end(); it2++)
				if (it->first != it2->first && abs(it->first - it2->first) % m == 0)
				{
					cout << "Yes" << endl << it2->first << ' ', k--;
					while (k--)
						cout << it->first << ' ';
					return 0;
				}
	cout << "No";
	return 0;
}


#include <iostream>
#include <map>
using namespace std;

int main()
{
	int n, k, m, x;
	cin >> n >> k >> m;
	map<int,int>A;
	for (int i = 0; i < n; i++)
		cin >> x, A[x]++;
	for (auto it = A.begin(); it != A.end(); it++)
	{
		if (it->second >= k)
		{
			cout << "Yes" << endl;
			while(k--)
				cout << it->first << ' ';
			return 0;
		}
		if (it->second == k - 1)
		{
			for (auto it2 = A.begin(); it2 != A.end(); it2++)
				if (it->first != it2->first && abs(it->first - it2->first) % m == 0)
				{
					cout << "Yes" << endl << it2->first << ' ', k--;
					while (k--)
						cout << it->first << ' ';
					return 0;
				}
		}
	}
	cout << "No";
	return 0;
}


#include <iostream>
#include <map>
#include <vector>
using namespace std;

int main()
{
	int n, k, m;
	cin >> n >> k >> m;
	vector<int>A(n);
	map<int, vector<int>>B;
	for(int i = 0; i < n; i++)
	{
		cin >> A[i];
		B[A[i] % m].push_back(A[i]);
		if (B[A[i] % m].size() == k)
		{
			cout << "Yes" << endl;
			for (int u = 0; u < k; u++)
				cout << B[A[i] % m][u] << ' ';
			return 0;
		}
	}
	cout << "No";
	return 0;
}


#include <iostream>
#include <sstream>
#include <algorithm>
#include <queue>
#include <string>
#include <cstring>
#include <set>
#include <list>
#include <cmath>
#include <iterator>
#include <numeric>
#include <regex>
#include <map>
#include <limits>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <array>

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)

#define time__(d) for(long blockTime = 0; (blockTime == 0 ? (blockTime=clock()) != 0 : false); debug("%s time : %.4fs", d, (double)(clock() - blockTime) / CLOCKS_PER_SEC))

using namespace std;

int main()
{

	int32_t n, k, m;
	cin >> n >> k >> m;

	map<int32_t, vector<int32_t>> map;

	for (int32_t i = 0; i < n; i++)
	{
		int32_t a;
		cin >> a;
		map[a % m].push_back(a);
		if (map[a % m].size() == k) {
			cout << "Yes" << endl;
			for each (auto ans in map[a % m])
			{
				cout << ans << ' ';
			}
			cout << endl;
			return 0;
		}
	}

	cout << "No" << endl;

}


#include <iostream>

using namespace std;

int main()
{
  int n, k, m, a[100100], b[100100] = {0}, c = -1;
  cin >> n >> k >> m;

  for (int i = 0; i < n; i++)
  {
    cin >> a[i];
    b[a[i] % m] += 1;
  }

  for (int i = 0; i < m; i++)
    if (b[i] >= k)
      c = i;

  if (c == -1)
  {
    cout << "No";
  }
  else
  {
    cout << "Yes\n";
    int cnt = 0;
    for (int i = 0; i < n && cnt < k; i++)
      if (a[i] % m == c)
      {
        cout << a[i] << ' ';
        cnt++;
      }
  }

  return 0;
}


#include <iostream>
#include <fstream>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
#include <iomanip>
#include <set>
#include <map>
#include <utility>
#include <queue>
#include <string.h>

#define SZ size()
#define VEC vector
#define PB push_back
#define MP make_pair
#define SS second
#define FF first
#define PII pair <int,int>
#define LL long long

using namespace std;

int n, k, m;
map <int, VEC <int> > mp;
VEC <int> ans;

void in()
{
    //ifstream cin("input.txt");
    cin >> n >> k >> m;
    for (int i = 0; i < n; ++i){
        int a;
        cin >> a;
        mp[a%m].PB(a);
    }
}

void solution()
{
    map <int, VEC <int> >:: iterator it;
    for (it = mp.begin(); it != mp.end(); it++){
        if ( (it->SS).SZ >= k ){
            ans = (it->SS);
        }
    }
}

void out()
{
    //ofstream cout("output.txt");
    if (ans.SZ){
        cout << "Yes\n";
        for (int i = 0; i < k-1; ++i)
            cout << ans[i] << " ";
        cout << ans[k-1] << "\n";
    }
    else
        cout << "No\n";
}

int main()
{
    in();
    solution();
    out();
    return 0;
}


#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
#define ll long long int
const ll maxn = 1e5 + 7;
#define INF 0x3f3f3f3f
struct node
{
	ll val;
	ll id;
}b[maxn];
bool cmp(node a, node b)
{
	return a.val < b.val;
}
ll a[maxn];
int main()
{
	ll n, k, m;
	while (cin >> n >> k >> m)
	{
		for (int i = 1; i <= n; i++)
		{
			cin >> a[i];
			b[i].val = a[i] % m;
			b[i].id = i;
		}
		int flag = 0, ans = -1;
		sort(b + 1, b + 1 + n, cmp);
		b[0].val = INF;
		for (int i = 2; i <= n; i++)
		{
			if (b[i].val == b[i - 1].val)
			{
				flag++;
				if (b[i - 1].val != b[i - 2].val)
				{
					flag++;
				}
				if (flag >= k)
				{
					ans = b[i].val;
					break;
				}
			}
			else
			{
				flag = 0;
			}
		}
		if (ans == -1)
		{
			cout << "No" << endl;
		}
		else
		{
			cout << "Yes" << endl; int cnt = 0;
			for (int i = 1; i <= n; i++)
			{
				if (cnt == k)
					break;
				if (a[i] % m == ans&&cnt == 0)
				{
					cout << a[i];
					cnt++;
				}
				else if (a[i] % m == ans&&cnt)
				{
					cout << " " << a[i];
					cnt++;
				}
			}
			cout << endl;
		}
	}
	return 0;
}


#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<iomanip>
using namespace std;
#define LL long long
const LL maxn = 1e5 + 7;
#define INF 0x3f3f3f3f
LL a[maxn];
LL b[maxn];
LL c[maxn];
struct node
{
	LL s;
	LL p;
	LL t;
}d[maxn];
LL cmp(node a, node b)
{
	return a.p<b.p;
}
int main()
{
	LL n, k, m;
	while (cin >> n >> k >> m)
	{
		memset(a, 0, sizeof(a));
		memset(b, 0, sizeof(b));
		memset(c, 0, sizeof(c));
		LL ans = 0;
		for (LL i = 1; i <= n; i++)
		{
			cin >> a[i];
			b[i] = a[i] % m;
		}
		b[0] = INF;
		for (LL i = 1; i <= n; i++)
		{
			d[i].s = a[i];
			d[i].p = b[i];
			d[i].t = i;

		}
		d[0].p = INF;
		sort(d + 1, d + n + 1, cmp); LL cnt = 0;
		for (LL i = 2; i <= n; i++)
		{
			if (d[i].p == d[i - 1].p)
			{
				cnt++;
				if (d[i - 1].p != d[i - 2].p)
				{
					cnt++;
					c[d[i - 1].t]++;
				}
				c[d[i].t]++;
			}
		}
		if (cnt<k)
		{

			cout << "No" << endl;
		}
		else

		{
			cout << "Yes" << endl;
			bool flag = 0;
			for (LL i = 1; i <= n; i++)
			{
				if (ans == k)
					break;
				if (c[i] && flag == 0)
				{
					cout << a[i];
					flag = 1;
					ans++;
					continue;

				}
				if (c[i] && flag)
				{

					cout << " " << a[i];
					ans++;
				}

			}
			cout << endl;
		}
	}
	return 0;
}


#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<iomanip>
using namespace std;
const int maxn=1e5+7;
#define INF 0x3f3f3f3f
#define LL long long int
int a[maxn];
int b[maxn];
int c[maxn];
struct node
{
    int s;
    int p;
    int t;
}d[maxn];
int cmp(node a,node b)
{
    return a.p<b.p;
}
int main()
{
    int n,k,m;
    while(cin>>n>>k>>m)
    {
         memset(a,0,sizeof(a));
         memset(b,0,sizeof(b));
         memset(c,0,sizeof(c));
         int ans=0;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
        b[i]=a[i]%m;
    }
    b[0]=INF;
    for(int i=1;i<=n;i++)
    {
        d[i].s=a[i];
        d[i].p=b[i];
        d[i].t=i;

    }
    sort(d+1,d+n+1,cmp);int cnt=0;
    for(int i=2;i<=n;i++)
    {
        if(d[i].p==d[i-1].p)
         {
           cnt++;
           if(d[i-1].p!=d[i-2].p)
           {
               cnt++;
               c[d[i-1].t]++;
           }
           c[d[i].t]++;
         }
    }
    if(cnt<k)
    {

        cout<<"No"<<endl;
    }
    else

    {
        cout<<"Yes"<<endl;
        bool flag=0;
        for(int i=1;i<=n;i++)
        {
            if(c[i]&&flag==0)
            {
                cout<<a[i];
                flag=1;
                ans++;
                continue;

            }
            if(c[i]&&flag)
            {

                cout<<" "<<a[i];
                ans++;
            }
            if(ans==k)
                break;

        }
        cout<<endl;
    }
    }
 return 0;
}


#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<iomanip>
using namespace std;
const int maxn=1e5+7;
#define INF 0x3f3f3f3f
#define LL long long int
int a[maxn];
int b[maxn];
int c[maxn];
struct node
{
    int s;
    int p;
    int t;
}d[maxn];
int cmp(node a,node b)
{
    return a.p<b.p;
}
int main()
{
    int n,k,m;
    while(cin>>n>>k>>m)
    {
         memset(a,0,sizeof(a));
         memset(b,0,sizeof(b));
         memset(c,0,sizeof(c));
         int ans=0;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
        b[i]=a[i]%m;
    }
    b[0]=INF;
    for(int i=1;i<=n;i++)
    {
        d[i].s=a[i];
        d[i].p=b[i];
        d[i].t=i;

    }
    sort(d+1,d+n+1,cmp);int cnt=0;
    for(int i=2;i<=n;i++)
    {
        if(d[i].p==d[i-1].p)
         {
           cnt++;
           if(d[i-1].p!=d[i-2].p)
           {
               cnt++;
               c[d[i-1].t]++;
           }
           c[d[i].t]++;
         }
    }
    if(cnt<k)
    {

        cout<<"No"<<endl;
    }
    else

    {
        cout<<"Yes"<<endl;
        bool flag=0;
        for(int i=1;i<=n;i++)
        {
            if(ans==k)
                break;
            if(c[i]&&flag==0)
            {
                cout<<a[i];
                flag=1;
                ans++;
                continue;

            }
            if(c[i]&&flag)
            {

                cout<<" "<<a[i];
                ans++;
            }

        }
        cout<<endl;
    }
    }
 return 0;
}


#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<iomanip>
using namespace std;
const int maxn=1e5+7;
#define INF 0x3f3f3f3f
#define LL long long int
int a[maxn];
int b[maxn];
int c[maxn];
struct node
{
    int s;
    int p;
    int t;
}d[maxn];
int cmp(node a,node b)
{
    return a.p<b.p;
}
int main()
{
    int n,k,m;
    while(cin>>n>>k>>m)
    {
         memset(a,0,sizeof(a));
         memset(b,0,sizeof(b));
         memset(c,0,sizeof(c));
         int ans=0;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
        b[i]=a[i]%m;
    }
    b[0]=INF;
    for(int i=1;i<=n;i++)
    {
        d[i].s=a[i];
        d[i].p=b[i];
        d[i].t=i;

    }
    sort(d+1,d+n+1,cmp);int cnt=0;
    for(int i=2;i<=n;i++)
    {
        if(d[i].p==d[i-1].p)
         {
           cnt++;
           if(d[i-1].p!=d[i-2].p)
           {
               cnt++;
               c[d[i-1].t]++;
           }
           c[d[i].t]++;
         }
    }
    if(cnt<k)
    {

        cout<<"NO"<<endl;
    }
    else

    {
        bool flag=0;
        for(int i=1;i<=n;i++)
        {
            if(c[i]&&flag==0)
            {
                cout<<a[i];
                flag=1;
                ans++;
                continue;

            }
            if(c[i]&&flag)
            {

                cout<<" "<<a[i];
                ans++;
            }
            if(ans==k)
                break;

        }
        cout<<endl;
    }
    }
 return 0;
}


#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<iomanip>
using namespace std;
const int maxn=1e5+7;
#define INF 0x3f3f3f3f
#define LL long long int
int a[maxn];
int b[maxn];
int c[maxn];
struct node
{
    int s;
    int p;
    int t;
}d[maxn];
int cmp(node a,node b)
{
    return a.p<b.p;
}
int main()
{
    int n,k,m;
    while(cin>>n>>k>>m)
    {
         memset(a,0,sizeof(a));
         memset(b,0,sizeof(b));
         memset(c,0,sizeof(c));
         int ans=0;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
        b[i]=a[i]%m;
    }
    b[0]=INF;
    for(int i=1;i<=n;i++)
    {
        d[i].s=a[i];
        d[i].p=b[i];
        d[i].t=i;

    }
    d[0].p=INF;
    sort(d+1,d+n+1,cmp);int cnt=0;
    for(int i=2;i<=n;i++)
    {
        if(d[i].p==d[i-1].p)
         {
           cnt++;
           if(d[i-1].p!=d[i-2].p)
           {
               cnt++;
               c[d[i-1].t]++;
           }
           c[d[i].t]++;
         }
    }
    if(cnt<k)
    {

        cout<<"No"<<endl;
    }
    else

    {
        cout<<"Yes"<<endl;
        bool flag=0;
        for(int i=1;i<=n;i++)
        {
            if(ans==k)
                break;
            if(c[i]&&flag==0)
            {
                cout<<a[i];
                flag=1;
                ans++;
                continue;

            }
            if(c[i]&&flag)
            {

                cout<<" "<<a[i];
                ans++;
            }

        }
        cout<<endl;
    }
    }
 return 0;
}


#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
#define ll long long int
const ll maxn = 1e5 + 7;
struct node
{
	ll val;
	ll id;
}b[maxn];
bool cmp(node a, node b)
{
	return a.val < b.val;
}
ll a[maxn];
int main()
{
	ll n, k, m;
	while (cin >> n >> k >> m)
	{
		for (int i = 1; i <= n; i++)
		{
			cin >> a[i];
			b[i].val = a[i] % m;
			b[i].id = i;
		}
		int flag = 0, ans = -1;
		sort(b + 1, b + 1 + n, cmp);
		for (int i = 2; i <= n; i++)
		{
			if (b[i].val == b[i - 1].val)
			{
				flag++;
				if (b[i - 1].val != b[i - 2].val)
				{
					flag++;
				}
				if (flag >= k)
				{
					ans = b[i].val;
					break;
				}
			}
			else
			{
				flag = 0;
			}
		}
		if (ans == -1)
		{
			cout << "No" << endl;
		}
		else
		{
			cout << "Yes" << endl; int cnt = 0;
			for (int i = 1; i <= n; i++)
			{
				if (cnt == k)
					break;
				if (a[i] % m == ans&&cnt == 0)
				{
					cout << a[i];
					cnt++;
				}
				else if (a[i] % m == ans&&cnt)
				{
					cout << " " << a[i];
					cnt++;
				}
			}
			cout << endl;
		}
	}
	return 0;
}


#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
#define ll long long int
const ll maxn = 1e5 + 7;
struct node
{
	ll val;
	ll id;
}b[maxn];
bool cmp(node a, node b)
{
	return a.val < b.val;
}
ll a[maxn];
int main()
{
	ll n, k, m;
	while (cin >> n >> k >> m)
	{
		for (int i = 1; i <= n; i++)
		{
			cin >> a[i];
			b[i].val = a[i] % m;
			b[i].id = i;
		}
		int flag = 0, ans = -1;
		sort(b + 1, b + 1 + n, cmp);
		for (int i = 2; i <= n; i++)
		{
			if (b[i].val == b[i - 1].val)
			{
				flag++;
				if (b[i - 1].val != b[i - 2].val)
				{
					flag++;
				}
				if (flag >= k)
				{
					ans = b[i].val;
					break;
				}
			}
			else
			{
				flag = 0;
			}
		}
		if (flag == -1)
		{
			cout << "No" << endl;
		}
		else
		{
			cout << "Yes" << endl; int cnt = 0;
			for (int i = 1; i <= n; i++)
			{
				if (cnt == k)
					break;
				if (a[i] % m == ans&&cnt == 0)
				{
					cout << a[i];
					cnt++;
				}
				else if (a[i] % m == ans&&cnt)
				{
					cout << " " << a[i];
					cnt++;
				}
			}
			cout << endl;
		}
	}
	return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <cstdlib>
using namespace std;
int n,k,m,s,num,q[200200],a[200200],sum[200200];
int main()
{
	scanf("%d%d%d",&n,&k,&m);
	for(int i=1;i<=n;i++){scanf("%d",&a[i]);q[i]=a[i]%m;}
	for(int i=1;i<=n;i++) sum[q[i]]++;
	bool flag=false;
	int i;
	for(i=0;i<m;i++) if(sum[i]>=k){flag=true;break;}
	if(flag){
		puts("Yes");
		num=i;
		for(int i=1;i<=n;i++)
			if(q[i]==num){
				s++;
				if(s==k){printf("%d\n",a[i]);break;}
				else printf("%d ",a[i]);
			}
	}else puts("No");
	return 0;
}


#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int a[100005];
int vis[100005];
int main()
{
    int n,k,m;
    while(cin>>n>>k>>m)
    {
        int cnt=0,u;
        memset(vis,0,sizeof(vis));
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            u=a[i]%m;
            vis[u]++;
            if(vis[u]==k)
            {
                cnt=u;
                break;
            }
        }
        if(cnt==0)
            cout<<"No"<<endl;
        else
        {
            cout<<"Yes"<<endl;
            for(int i=0;i<m;i++)
            {
                if(a[i]%m==cnt)
                {
                    k--;
                    cout<<a[i]<<" ";
                }
                if(k==0)  break;
            }
        }
    }
    return 0;
}


#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int a[100005];
int vis[100005];
int main()
{
    int n,k,m;
    while(cin>>n>>k>>m)
    {
        int cnt=-1,u;
        memset(vis,0,sizeof(vis));
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            u=a[i]%m;
            vis[u]++;
            if(vis[u]==k)
            {
                cnt=u;
                break;
            }
        }
        if(cnt==-1)
            cout<<"No"<<endl;
        else
        {
            cout<<"Yes"<<endl;
            for(int i=0;i<k;i++)
            {
                if(a[i]%m==cnt)
                {
                    cout<<a[i]<<" ";
                }
                if(k==0)  break;
            }
        }
    }
    return 0;
}


#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int a[100005];
int vis[100005];
int main()
{
    int n,k,m;
    while(cin>>n>>k>>m)
    {
        int cnt=-1,u;
        memset(vis,0,sizeof(vis));
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            u=a[i]%m;
            vis[u]++;
            if(vis[u]==k)
            {
                cnt=u;
                break;
            }
        }
        if(cnt==-1)
            cout<<"No"<<endl;
        else
        {
            cout<<"Yes"<<endl;
            for(int i=0;i<k;i++)
            {
                if(a[i]%m==cnt)
                {
                    cout<<a[i]<<" ";
                }
                if(k==0)  break;
            }
            cout<<endl;
        }
    }
    return 0;
}


#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int a[100005];
int vis[100005];
int main()
{
    int n,k,m;
    while(cin>>n>>k>>m)
    {
        int cnt=-1,u;
        memset(vis,0,sizeof(vis));
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            u=a[i]%m;
            vis[u]++;
            if(vis[u]==k)
            {
                cnt=u;
                break;
            }
        }
        if(cnt==-1)
            cout<<"No"<<endl;
        else
        {
            cout<<"Yes"<<endl;
            for(int i=0;i<m;i++)
            {
                if(a[i]%m==cnt)
                {
                    k--;
                    cout<<a[i]<<" ";
                }
                if(k==0)  break;
            }
        }
    }
    return 0;
}


#include<iostream>
#include<vector>
#include<math.h>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
using namespace std;

int a[128 * 1024];
int b[128 * 1024];
int ans[128 * 1024];

int main(){

	memset(ans, 0, 128 * 1024);
	int n, k, m;

	cin >> n >> k >> m;
	for (int i = 0; i < n; i++)
		cin >> a[i];

	for (int i = 0; i < n; i++)
		b[i] = a[i] % m;

	for (int i = 0; i < n; i++)
		ans[b[i]]++;

	int ind = -1;
	for (int i = 0; i < m; i++)
		if (ans[i] >= k) {
			ind = i;
			break;
		}

	if (ind == -1) {
		cout << "No" << endl;
		return 0;
	}

	cout << "Yes" << endl;
	for (int i = 0; i < n, k > 0; i++)
		if (b[i] == ind) {
			cout << a[i] << " ";
			k--;
		}
	cout << endl;

	return 0;
}


#include <stdio.h>
#include <algorithm>
using namespace std;
#pragma warning(disable : 4996)

FILE *in = fopen("in.txt", "r");
FILE *out = fopen("out.txt", "w");
int A[111111] = { 0 };
int ma[111111] = { 0 };
int main()
{
	int n = 0, k = 0, m = 0;
	scanf("%d %d %d", &n, &k, &m);
	int t = 0;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", A+i);
		ma[(*(A+i) % m)]++;
	}
	int i = 0;
	for (i = 0; i < m; i++)
		if (ma[i] >= k)
			break;
	if (i == m) {
		printf("No\n");
		return 0;
	}
	printf("Yes\n");
	sort(A, A + n);
	int c = 0;
	for (int j = 0; j < n; j++)
	{
		if (c == k)
			break;
		if (A[j] % m == i) {
			printf("%d ", A[j]);
			c++;
		}
	}
	return 0;
}


#include <stdio.h>
#include <algorithm>
using namespace std;
#pragma warning(disable : 4996)

FILE *in = fopen("in.txt", "r");
FILE *out = fopen("out.txt", "w");
int A[11111] = { 0 };
int ma[11111] = { 0 };
int main()
{
	int n = 0, k = 0, m = 0;
	scanf("%d %d %d", &n, &k, &m);
	int t = 0;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", A+i);
		ma[(*(A+i) % m)]++;
	}
	int i = 0;
	for (i = 0; i < m; i++)
		if (ma[i] >= k)
			break;
	if (i == m) {
		printf("No\n");
		return 0;
	}
	printf("Yes\n");
	sort(A, A + n);
	int c = 0;
	for (int j = 0; j < n; j++)
	{
		if (c == k)
			break;
		if (A[j] % m == i) {
			printf("%d ", A[j]);
			c++;
		}
	}
	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <memory.h>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <utility>
#include <algorithm>

using namespace std;
#define mp make_pair
# define sq(x) ((x) * (x))
typedef long double ldb;
typedef pair <ldb, ldb> pldbldb;
typedef long long int64;
typedef unsigned long long uint64;
typedef pair<int, int> pii;
typedef pair<int64, int64> pll;
const int INF = (int)(1e9 + 1e6);
const int64 LINF = (int64)(4e18);
const double EPS = 1e-9;/////
ldb eps = 1e-10;
int comp(ldb x, ldb y)
{
	if (x < y - eps)
		return -1;
	if (fabs(x - y) < eps)
		return 0;
	if (x > y + eps)
		return 1;
}

struct dot
{
	ldb x, y;
	dot() { x = 0; y = 0; }
	dot(ldb x, ldb y) : x(x), y(y) {}
};

ldb dist(dot a, dot b)
{
	return sqrt(sq(a.x - b.x) + sq(a.y - b.y));
}

ldb dist(dot a)
{
	return sqrt(sq(a.x) + sq(a.y));
}
ldb dist(dot a, ldb A, ldb B, ldb C)
{
	return fabs((A * a.x + B * a.y + C) / sqrt(sq(A) + sq(B)));
}

int n, k, m, a;
vector <vector<int>> del;
void solve()
{
	cin >> n >> k >> m;
	del.resize(m);
	for (int i = 0; i < n; ++i)
	{
		cin >> a;
		del[a % m].push_back(a);
	}

	for (int i = 0; i < m; ++i)
	{
		if (del[i].size() >= k)
		{
			cout << "Yes\n";

			for (int j = 0; j < k; ++j)
			{
				cout << del[i][j] << ' ';
			}

			return;
		}
	}

	cout << "No\n";
}
int main()
{
	iostream::sync_with_stdio(false); cin.tie(0);
	//freopen("chickens.in", "r", stdin); freopen("chickens.out", "w", stdout);
#ifdef _MY_DEBUG
	freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout);
#endif
	int ts = 1;
	for (int i = 0; i < ts; ++i)
		solve();

	return 0;
}


#define _USE_MATH_DEFINES

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <locale.h>
#include <assert.h>

#define min(a,b) (((a)<(b)) ? (a) : (b))
#define max(a,b) (((a)>(b)) ? (a) : (b))

int Compare(const void * x1, const void * x2)
{
	return ((*((int*)x1)) - (*((int*)x2)));
}

int mod[100000] = { 0 }, a[100000];

int main(void)
{
	//freopen("", "r", stdin);
	//freopen("", "w", stdout);
	int n, k, m;
	scanf("%d %d %d", &n, &k, &m);
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i]);
		mod[a[i] % m]++;
	}
	int i;
	for (i = 0; i < 100000; i++)
	{
		if (mod[i] >= k)
		{
			break;
		}
	}
	if (i == 100000)
	{
		printf("No\n");
		return 0;
	}
	printf("Yes\n");
	int cnt = 0;
	for (int j = 0; j < n; j++)
	{
		if (a[j] % m == i)
		{
			printf("%d ", a[j]);
			cnt++;
		}
		if (cnt == k)
		{
			break;
		}
	}
	printf("\n");
	//fclose(stdin);
	//fclose(stdout);
	return 0;
}


#include <vector>
#include <iostream>

using namespace std;

int main()
{
        int n, k, m, a;
        cin >> n >> k >> m;
        vector < vector < int > > v(100001);
        for(int i = 0; i < n; i++)
        {
            cin >> a;
            v[a % m].push_back(a);
        }
        for(int i = 0; i < m; i++)
            if(v[i].size() >= k)
            {
                cout << i << " " << v[i].size() << " ";
                cout << "Yes" << endl;
                 for(int j = 0; j < k; j++)
                    cout << v[i][j] << " ";
                 return 0;
            }
       cout << "No";

}


#include <vector>
#include <iostream>

using namespace std;

int main()
{
        int n, k, m, a;
        cin >> n >> k >> m;
        vector < vector < int > > v(n);
        for(int i = 0; i < n; i++)
        {
            cin >> a;
            v[a % m].push_back(a);
        }
        for(int i = 0; i < m; i++)
            if(v[i].size() >= k)
            {
                cout << "Yes" << endl;
                 for(int j = 0; j < k; j++)
                    cout << v[i][j] << " ";
                 return 0;
            }
       cout << "No";
}


#include <vector>
#include <iostream>

using namespace std;

int main()
{
        int n, k, m, a;
        cin >> n >> k >> m;
        vector < vector < int > > v(100001);
        for(int i = 0; i < n; i++)
        {
            cin >> a;
            v[a % m].push_back(a);
        }
        for(int i = 0; i < m; i++)
            if(v[i].size() >= k)
            {
                cout << "Yes" << endl;
                 for(int j = 0; j < k; j++)
                    cout << v[i][j] << " ";
                 return 0;
            }
       cout << "No";

}


#include <iostream>
#include <vector>
using namespace std;

int main()
{
	int n, k, m, t;
	cin >> n >> k >> m;
	vector<vector<int>> input(100000);
	for (int i = 0; i < n; i++)
	{
		cin >> t;
		input[t % m].push_back(t);
	}
	bool f = false;
	for (int i = 0; i < input.size(); i++)
	{
		if (input[i].size() >= k)
		{
			f = true;
			cout << "Yes" << "\n";
			for (int j = 0; j < k; j++)
			{
				cout << input[i][j] <<  " ";
			}
		}
		if (f) break;
	}
	if (!f)
	{
		cout << "No";
	}
	return 0;
}


#include <iostream>
#include <set>
#include <vector>
using namespace std;

int main()
{
	int n, k, m, t;
	cin >> n >> k >> m;
	vector<int> input(n);
	set<int> S;
	for (int i = 0; i < n; i++)
	{
		cin >> t;
		input[i] = t;
	}
	for (int i = 0; i < n; i++)
	{
		for (int j = i + 1; j < n; j++)
		{
			if ((input[i] - input[j]) % m == 0)
			{
				S.insert(i); S.insert(j);
			}
		}
	}
	if (S.size() < k)
	{
		cout << "No";
	}
	else
	{
		cout << "Yes" << "\n";
		int r = 0;
		for (set<int>::const_iterator i = S.begin(); i != S.end() && r != k; i++)
		{
			cout << input[*i] << " ";
			r++;
		}
	}
	return 0;
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <math.h>
#include <limits.h>
#include <algorithm>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <string>
#include <string.h>
#include <sstream>
#include <ctime>

using namespace std;

#define eps 1e-12
#define pi 3.14159265358979323846
#define pb push_back
#define mp make_pair
#define st first
#define nd second
#define bgn begin
#define ll long long
#define ld long double
#define ull unsigned long long
#define ii pair<ll,ll>

const int N=1e5+10;
ll n,m,k,a;
vector<ll>v[N];

void solve()
{
	cin>>n>>k>>m;
	for(int i=0;i<m;i++)v[i].clear();
	for(int i=1;i<=n;i++)
	{
		cin>>a;
		v[a%m].pb(a);
	}
	for(int i=0;i<m;i++)
	{
		if(v[i].size()>=k)
		{
			cout<<"Yes\n";
			for(int j=0;j<k;j++)cout<<v[i][j]<<" ";
			cout<<"\n";
			return;
		}
	}
	cout<<"No\n";
}

int main()
{
	std::ios::sync_with_stdio(0);
	cin.tie(0);
#ifndef ONLINE_JUDGE
	freopen("in.txt","r",stdin);
#endif
	solve();
	return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <map> // STL
#include <string>
#include <vector>
#include <queue>
#include <stack>
#define mpr make_pair
#define debug() puts("okkkkkkkk")

using namespace std;

typedef long long LL;

const int inf = 1 << 26;

int n, k, m;
vector<int> g[200005];

int main(){
	scanf("%d %d %d",&n,&k,&m);
	for (int i=0;i<n;i++){
		int s;
		scanf("%d", &s);
		g[s%m].push_back(s);
	}
	int fg=-1;
	for (int i=0;i<m;i++){
		if(g[i].size()>=k){fg=i; break;}
	}
	if(fg==-1){puts("No");return 0;}
	puts("Yes");
	for (int i=0;i<g[fg].size()&&i<k;i++)printf("%d ",g[fg][i]);
	puts("");

	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <string>
using namespace std;
int b[100003];
int s;
bool t;
int main()
{
	int n, i, j, k = 1, m, a[100003];
	int x = -1;
	cin >> n >> k >> m;
	for (i = 0;i < n;i++)
		cin >> a[i];
	for (i = 0;i < n;i++)
		b[a[i] % m]++;

	for(i=0;i<m;i++)
		if (b[i] >= k)
		{
			x = i;
			break;
		}
	if (x == -1)
	{
		cout << "NO" << endl;
		return 0;
	}
	cout << "YES" << endl;
	i = 0;
	while(k!=0)
	{
		if (a[i] % m == x)
			cout << a[i] << " ";
		k--;
		i++;
	}
	//system("pause");
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <string>
using namespace std;
int b[100002];
int s;
bool t;
int main()
{
	int n, i, j, k, m, a[100002];
	int x = -1;
	cin >> n >> k >> m;
	for (i = 0;i < n;i++)
		cin >> a[i];
	for (i = 0;i < n;i++)
		b[a[i] % m]++;

	for(i=0;i<m;i++)
		if (b[i] >= k)
		{
			x = i;
			break;
		}
	if (x == -1)
	{
		cout << "No" << endl;
		return 0;
	}
	cout << "Yes" << endl;
	i = 0;

	for(i=0;i<n;i++)
	{
		if (k == 0)
			break;
		if (a[i] % m == x)
		{
			cout << a[i] << " ";
			k--;
		}
	}
	//system("pause");
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <string>
#include "Header.h"
using namespace std;
int b[100005];
int s;
bool t;
int main()
{
	int n, i, j, k = 1, m, a[100002];
	int x = -1;
	cin >> n >> k >> m;
	for (i = 0;i < n;i++)
		cin >> a[i];
	for (i = 0;i < n;i++)
		b[a[i] % m]++;

	for(i=0;i<m;i++)
		if (b[i] >= k)
		{
			x = i;
			break;
		}
	if (x == -1)
	{
		cout << "NO" << endl;
		return 0;
	}
	cout << "YES" << endl;
	i = 0;
	while(k!=0)
	{
		if (a[i] % m == x)
			cout << a[i] << " ";
		k--;
		i++;
	}
	//system("pause");
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <string>
using namespace std;
int b[100002];
int s;
bool t;
int main()
{
	int n, i, j, k, m, a[100002];
	int x = -1;
	cin >> n >> k >> m;
	for (i = 0;i < n;i++)
		cin >> a[i];
	for (i = 0;i < n;i++)
		b[a[i] % m]++;

	for(i=0;i<m;i++)
		if (b[i] >= k)
		{
			x = i;
			break;
		}
	if (x == -1)
	{
		cout << "NO" << endl;
		return 0;
	}
	cout << "YES" << endl;
	i = 0;

	for(i=0;i<n;i++)
	{
		if (k == 0)
			break;
		if (a[i] % m == x)
		{
			cout << a[i] << " ";
			k--;
		}
	}
	//system("pause");
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS

#include <algorithm>
#include <sstream>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <map>
#include <set>

#include <vector>

using namespace std;

#define INF 1000000000
#define EPS 0.0000001

#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define ABS(a) (((a) > 0) ? (a) : (-(a)))
#define LOOP(i, n) for(int i = 0; i < (n); i++)

typedef long long int lint;

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	int n, k, m;
	scanf("%d %d %d", &n, &k, &m);

	vector <vector <int> > a(m);

	for (int i = 0; i < n; i++)
	{
		int b;
		scanf("%d", &b);
		a[b % m].push_back(b);
	}

	for (int i = 0; i < m; i++)
	{
		if (a[i].size() >= k)
		{
			printf("Yes\n");
			for (int j = 0; j < k; j++)
			{
				printf("%d ", a[i][j]);
			}
			return 0;
		}
	}

	printf("No");

	return 0;
}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <math.h>

#pragma warning (disable:4996)

using namespace std;

const int MAXN = 10 + 1e5;
int n, m, k, module[MAXN], b, ans;
vector <int> v;

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "rt", stdin);
	freopen("output.txt", "wt", stdout);
#endif
	int i, j;
	ans = 0;
	scanf("%d%d%d", &n, &k, &m);
	for (i = 0; i < n; ++i)
	{
		scanf("%d", &b);
		module[b%m]++;
		v.push_back(b);
	}
	for (i = 0; i < m; ++i)
	{
		if (module[i] >= k)
		{
			printf("Yes\n");
			for (j = 0; j < n; ++j)
			{
				if (v[j] % m == i && ans < k)
				{
					printf("%d ", v[j]);
					ans++;
				}
			}
			return 0;
		}
	}
	printf("No");
	return 0;
}


#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;

const int maxn=1e5+5;
int a[maxn];
int mod[maxn];
int vis[maxn];
int main()
{
    int n,k,m;
    while(~scanf("%d%d%d",&n,&k,&m))
    {
        for(int i=0;i<n;i++)
        {
            scanf("%d",&a[i]);
            mod[i]=a[i]%m;
        }
        memset(vis,-1,sizeof(vis));
       for(int i=0;i<n;i++)
       {
           if(vis[mod[i]]!=-1)
           {
               vis[mod[i]]++;
           }
           else if(vis[mod[i]]==-1)
           {
               vis[mod[i]]=1;
           }
       }
       int maxx=0;
       int flag=0;
       for(int i=0;i<n;i++)
       {
           if(vis[mod[i]]>maxx)
           {
                maxx=vis[mod[i]];
                flag=mod[i];
           }
       }
       if(maxx>=k)
       {
           printf("Yes\n");
           int num=0;
           for(int i=0;i<n;i++)
           {
               if(a[i]%m==flag)
               {
                   if(num==k-1)
                   {
                       printf("%d\n",a[i]);
                       break;
                   }
                   else
                   {
                       printf("%d ",a[i]);
                       num++;
                   }
               }
           }
       }
       else printf("No\n");
    }
}


#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;

const int maxn=1e5+5;
int a[maxn];
int mod[maxn];
int vis[maxn];
int main()
{
    int n,k,m;
    while(~scanf("%d%d%d",&n,&k,&m))
    {
        for(int i=0;i<n;i++)
        {
            scanf("%d",&a[i]);
            mod[i]=a[i]%m;
        }
        memset(vis,-1,sizeof(vis));
       for(int i=0;i<n;i++)
       {
           if(vis[mod[i]]!=-1)
           {
               vis[mod[i]]++;
           }
           else if(vis[mod[i]]==-1)
           {
               vis[mod[i]]=1;
           }
       }
       int maxx=0;
       int flag=0;
       for(int i=0;i<n;i++)
       {
           if(vis[mod[i]]>maxx)
           {
                maxx=vis[mod[i]];
                flag=mod[i];
           }
       }
       if(maxx>=k)
       {
           printf("YES\n");
           int num=0;
           for(int i=0;i<n;i++)
           {
               if(a[i]%m==flag)
               {
                   if(num==k-1)
                   {
                       printf("%d\n",a[i]);
                       break;
                   }
                   else
                   {
                       printf("%d ",a[i]);
                       num++;
                   }
               }
           }
       }
       else printf("NO\n");
    }
}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include <iterator>
#include<iomanip>
#include<vector>
#include<cmath>
#include<queue>
#include<stack>
#include<list>
#include<stdio.h>
#include<set>
#include <functional>

#define mod 1000000007
#define mod2 30000000
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.14159265359
#define eps  1e-9
LL maxx(LL a , LL b){ return a>b ?  a : b ;}
LL minn(LL a , LL b){ return a>b ?  b : a ;}

using namespace std;
int dx[] = {1 , 1 ,1 , 0 , 0  , -1 , -1  , -1  , 0 };
int dy[] = { -1 , 0  , 1 , 1 , -1 , 0 , 1 , -1 , 0 };
void boostIO()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return (a*b)/gcd(a , b);
}
LL poww(LL base, LL exp){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int sum(int x)
{
    int ret = 0 ;
    while(x){
        ret = ret + x % 10 ;
        x/=10 ;
    }
    return ret ;
}
int vis[100100] ;
int main()
{
    int n , m , k ; cin >> n >> k >> m ;
    vector<int>ans , a;
    for(int i = 0 ; i < n ; i++){
        int x; cin >> x ;
        a.pb(x) ; vis[x % m]++ ;
    }
    for(int i = 0 ; i < m ; i++){
        if(vis[i] >= k){
            for(int j = 0 ; j < n  && ans.size() < k; j++){
                if(a[j] % m == i){
                    ans.pb(a[j]) ;
                }
            }
            cout <<"Yes"<<endl ;
            for(int j = 0 ; j < ans.size() ; j++)
                cout << ans[j] << " ";
            return 0 ;
        }
    }
    cout << "No" << endl ;
}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include<iomanip>
#include<vector>
#include<cmath>
#include<queue>
#include<stack>
#include<list>
#include<set>
#include <functional>

#define mod 1000000007
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.14159265359

LL maxx(LL a , LL b){ return a>b ?  a : b ;}
LL minn(LL a , LL b){ return a>b ?  b : a ;}

using namespace std;
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return (a*b)/gcd(a , b);
}
LL poww(LL base, LL exp){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int sum(int x)
{
    int ans=0;
    while(x)
    {
        ans+=x%10;
        x/=10;
    }
    return ans;
}
int main()
{
    int n,m,k; vector<int>a;
    cin>>n>>k>>m; int vis[100100]={0};
    for(int i=0;i<n;i++)
    {
        int x; scanf("%d" , &x);
        a.pb(x); vis[x%m]++;
    }
    for(int i=0;i<m;i++)
    if(vis[i]>=k)
    {
        cout<<"Yes"<<endl; int num=0;
        for(int j=0;j<n && num < k ;j++)
        if(a[j]%m==i){
        printf("%d " , a[j]);
        num++;}
        return 0;
    }
    cout<<"No" ;
}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include <iterator>
#include<iomanip>
#include<vector>
#include<cmath>
#include<queue>
#include<stack>
#include<list>
#include<stdio.h>
#include<set>
#include <functional>

#define mod 1000000007
#define mod2 30000000
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.14159265359
#define eps  1e-9
LL maxx(LL a , LL b){ return a>b ?  a : b ;}
LL minn(LL a , LL b){ return a>b ?  b : a ;}

using namespace std;
int dx[] = {1 , 1 ,1 , 0 , 0  , -1 , -1  , -1  , 0 };
int dy[] = { -1 , 0  , 1 , 1 , -1 , 0 , 1 , -1 , 0 };
void boostIO()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return (a*b)/gcd(a , b);
}
LL poww(LL base, LL exp){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int sum(int x)
{
    int ret = 0 ;
    while(x){
        ret = ret + x % 10 ;
        x/=10 ;
    }
    return ret ;
}
int vis[100100] ;
int main()
{
    int n , m , k ; cin >> n >> k >> m ;
    vector<int>ans , a;
    for(int i = 0 ; i < n ; i++){
        int x; cin >> x ;
        a.pb(x) ; vis[x % m]++ ;
    }
    for(int i = 0 ; i < m ; i++){
        if(vis[i] >= k){
            for(int j = 0 ; j < n ; j++){
                if(a[j] % m == i){
                    ans.pb(a[j]) ;
                }
            }
            cout <<"Yes"<<endl ;
            for(int j = 0 ; j < ans.size() ; j++)
                cout << ans[j] << " ";
            return 0 ;
        }
    }
    cout << "No" << endl ;
}


#include <iostream>
using namespace std;

int main()
{
	int y, k, n;
	cin >> y >> k >> n;
	if(y >= n)
	{
		cout << -1;
		return 0;
	}
	int dif = n-y;
	int add = 0;
	add = k - y%k;
	if(add == 0)
	{
		cout << -1;
		return 0;
	}
	for(int i = add; i <= dif;)
	{
		cout << i << " ";
		i += k;
	}
}


#include <iostream>
using namespace std;

int main()
{
	int y, k, n;
	cin >> y >> k >> n;
	if(y >= n)
	{
		cout << -1;
		return 0;
	}
	int dif = n-y;
	int add = 0;
	for(int i = 1; i < dif; i++)
	{
		if((y+i) % k == 0)
		{
			add = i;
			break;
		}
	}
	if(add == 0)
	{
		cout << -1;
		return 0;
	}
	for(int i = add; i < dif;)
	{
		cout << i << " ";
		i += k;
	}
}


#include <iostream>
using namespace std;

int main()
{
	int y, k, n;
	cin >> y >> k >> n;
	/*if(y >= n)
	{
		cout << -1;
		return 0;
	}*/
	int dif = n-y;
	int add = 0;
	add = k - y%k;
	if(add == 0 || add > dif)
		cout << -1;
	else
	{
		for(int i = add; i <= dif;)
		{
			cout << i << " ";
			i += k;
		}
	}
}


#include <stdio.h>
#include <iostream>
#include <fstream>
#include <map>
#include <vector>
#include <set>
#include <algorithm>
#include <string>

using namespace std;

int mas[5];

int main()
{
	int y, k, n;
	scanf_s("%d%d%d", &y, &k, &n);
	int i = y < k ? k - y : 1;
	while((y + i) % k != 0 && (y + i) <= n)
		++i;
	if((y + i) > n)
		printf("-1\n");
	else
	{
		for(; i + y <= n; i += k)
			printf("%d ", i);
		printf("\n");
	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <fstream>
#include <map>
#include <vector>
#include <set>
#include <algorithm>
#include <string>

using namespace std;

int mas[5];

int main()
{
	int y, k, n;
	scanf_s("%d%d%d", &y, &k, &n);
	int i = y <= k ? k - y : 1;
	while((y + i) % k != 0 && (y + i) <= n)
		++i;
	if((y + i) > n)
		printf("-1\n");
	else
	{
		for(; i + y <= n; i += k)
			printf("%d ", i);
		printf("\n");
	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <fstream>
#include <map>
#include <vector>
#include <set>
#include <algorithm>
#include <string>

using namespace std;

int mas[5];

int main()
{
	int y, k, n;
	scanf_s("%d%d%d", &y, &k, &n);
	int i = y <= k ? k : 1;
	while((y + i) % k != 0 && (y + i) <= n)
		++i;
	if((y + i) > n)
		printf("-1\n");
	else
	{
		for(; i + y <= n; i += k)
			printf("%d ", i);
		printf("\n");
	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <fstream>
#include <map>
#include <vector>
#include <set>
#include <algorithm>
#include <string>

using namespace std;

int mas[5];

int main()
{
	int y, k, n;
	scanf_s("%d%d%d", &y, &k, &n);
	int i = k - (y % k);
	if((y + i) > n)
		printf("-1\n");
	else
	{
		for(; i + y <= n; i += k)
			printf("%d ", i);
		printf("\n");
	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <fstream>
#include <map>
#include <vector>
#include <set>
#include <algorithm>
#include <string>

using namespace std;

int mas[5];

int main()
{
	int y, k, n;
	scanf_s("%d%d%d", &y, &k, &n);
	int i = 1;
	while((y + i) % k != 0 && (y + i) <= n)
		++i;
	if((y + i) > n)
		printf("-1\n");
	else
	{
		for(; i + y <= n; i += k)
			printf("%d ", i);
		printf("\n");
	}
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <string>
using namespace std;
typedef long long ll;
int main()
{
	ll y,k,n,q=0;
	cin>>y>>k>>n;
	ll i = k;
	for (;i <=n ; i+=k)
	{
		if (i>y)
		{cout<<i-y<<" ";
		q=1;}
	}
	if (q==0)
		cout<<-1;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <string>
using namespace std;
typedef long long ll;
int main()
{
	ll y,k,n,q=0;
	cin>>y>>k>>n;
	ll i = n;
	for (; i>y  ; i--)
	{
		if (i %k ==0)
		{
		break;
		}
	}
	for (;i >y ; i-=k)
	{
		cout<<i-y<<" ";
		q=1;
	}
	if (q==0)
		cout<<-1;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <string>
using namespace std;
typedef long long ll;
int main()
{
	ll y,k,n,q=0;
	cin>>y>>k>>n;
	ll i = y+1;
	for (; i<=n  ; i++)
	{
		if (i %k ==0)
		{
		break;
		}
	}
	for (;i <=n ; i+=k)
	{
		cout<<i-y<<" ";
		q=1;
	}
	if (q==0)
		cout<<-1;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <string>
using namespace std;
typedef long long ll;
int main()
{
	ll y,k,n,q=0;
	cin>>y>>k>>n;
	for (int i = y+1; i<=n  ; i++)
	{
		if (i %k ==0)
		{
			cout<<i-y<<" ";
			q=1;
		}
	}
	if (q==0)
		cout<<-1;
}


#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
unsigned long long int a[100000009];
unsigned long long int y, k, n, j, i;
int main() {
	int flag = 0;
	cin >> y >> k >> n;
	for (i = n - y; i >= 1; i--)
	{
		if ((i + y) % k == 0)
		{
			j = i;
			flag = 1;
			break;
		}
	}
	for (i = 1; i <= n - y; i++)
	{
		if ((i+y)%k ==0)
		{
			if (i != j)
			{
				cout << i << " ";
			}
			else
			{
				cout << i << endl;
			}
		}
	}
	if(flag==0)
	{
		cout << -1 << endl;
	}
}


#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
int a[100005];
int y, k, n, j, i,s;
int main() {
	int flag = 0;
	cin >> y >> k >> n;
	j = (n - y) / k;
	s = 0;
	for (i = 1; i <= n - y; i++)
	{
		if ((i+y)%k ==0)
		{
			flag = 1;
			s++;
			if (s != j)
			{
				cout << i << " ";
			}
			else
			{
				cout << i << endl;
			}
		}
	}
	if(flag==0)
	{
		cout << -1 << endl;
	}
}


#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
long long int a[100000009];
long long int y, k, n, j, i;
int main() {
	int flag = 0;
	cin >> y >> k >> n;
	for (i = n - y; i >= 1; i--)
	{
		if ((i + y) % k == 0)
		{
			j = i;
			flag = 1;
			break;
		}
	}
	for (i = 1; i <= n - y; i++)
	{
		if ((i+y)%k ==0)
		{
			if (i != j)
			{
				cout << i << " ";
			}
			else
			{
				cout << i << endl;
			}
		}
	}
	if(flag==0)
	{
		cout << -1 << endl;
	}
}


#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
int a[100005];
int y, k, n, j, i,s;
int main() {
	int flag = 0;
	cin >> y >> k >> n;
	for (i = 1; i <= n - y; i++)
	{
		if ((i+y)%k ==0)
		{
			flag = 1;
			cout << i << " ";
			break;
		}
	}
	i += k;
	if (flag == 1)
	{
		for (;;)
		{
			if (i + y + k > n&&i+y<=n)
			{
				cout << i<< endl;
				break;
			}
			else
			{
				cout << i << " ";
			}
			i += k;
		}
	}
	else
	{
		cout << -1 << endl;
	}
}


#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
int a[100005];
int y, k, n, j, i,s;
int main() {
	int flag = 0;
	cin >> y >> k >> n;
	for (i = 1; i <= n - y; i++)
	{
		if ((i+y)%k ==0)
		{
			flag = 1;
			cout << i << " ";
			break;
		}
	}
	i += k;
	if (flag == 1)
	{
		for (;;)
		{
			if (i + y + k >= n&&i+y<n)
			{
				cout << i<< endl;
				break;
			}
			else
			{
				cout << i << " ";
			}
			i += k;
		}
	}
	else
	{
		cout << -1 << endl;
	}
}


#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
int a[100005];
int y, k, n, j, i;
int main() {
	int flag = 0;
	cin >> y >> k >> n;
	for (i = n - y; i >= 1; i--)
	{
		if ((i + y) % k == 0)
		{
			j = i;
			flag = 1;
			break;
		}
	}
	for (i = 1; i <= n - y; i++)
	{
		if ((i+y)%k ==0)
		{
			if (i != j)
			{
				cout << i << " ";
			}
			else
			{
				cout << i << endl;
			}
		}
	}
	if(flag==0)
	{
		cout << -1 << endl;
	}
}


#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
unsigned long long int a[100000009];
unsigned long long int y, k, n, j, i;
int main() {
	int flag = 0;
	cin >> y >> k >> n;
	for (i = 1; i <= n - y; i++)
	{
		if ((i+y)%k ==0)
		{
			flag = 1;
			a[j++] = i;
		}
	}
	if (flag == 1)
	{
		for (i = 0; i <=j-2; i++)
		{
			cout << a[i] << " ";
		}
		cout << a[j - 1] << endl;
	}
	else
	{
		cout << -1 << endl;
	}
}


#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;

int main()
{
	int y, n, k, i;
	cin>>y>> k>>n;
	for (i = (y / k + 1)*k; i <= n; i += k)
	{
		cout<<i - y<<" ";
	}
	if ((y / k + 1)*k>n)
	{
		cout << "-1" << endl;
	}
	return 0;
}


#include <iostream>
#include<string>
using namespace std ;
int main ()
{
	int k , y, n, i, j;
	bool b = true , b1=true;

	cin >> y >>k >>n ;

	for (  i =1; i<= n-y ; i +=j )
	{
		if ((i+y) %k == 0 )
		{
			cout << i <<' ' ;
			b=false ;
		}
		if (!b & b1)
		{
		    j =k ;
			b1= false;
		}
	}

	if (b)
	cout <<"-1" ;

	return 0 ;
}


#include <iostream>
#include<string>
using namespace std ;
int main ()
{
	int k , y, n, i;
	bool b = true ;

	cin >> y >>k >>n ;

	for (  i =1; i<= n-y ; i ++ )
	{
		if ((i+y) %k == 0 )
		{
			cout << i <<' ' ;
			b=false ;
		}
	}

	if (b)
	cout <<"-1" ;

	return 0 ;
}


#include <iostream>
#include<string>
using namespace std ;
int main ()
{

	int k , y, n, i, c;
	bool b = true ;

	cin >> y >>k >>n ;

	for (  i =1; i<= n/k ; i ++ )
	{
		c= i*k -y ;
		if (c >0 )
		{cout << c <<' '; b= false ;}
	}

	if (b)
	cout <<"-1" ;

	return 0 ;
}


#include <iostream>
#include<string>
using namespace std ;
int main ()
{
	int k , y, n, i, j=1,l;
	bool b = true ;

	cin >> y >>k >>n ;

	for (  i =1; i<= n-y ; i +=j )
	{
		if ((i+y) %k == 0 )
		{
			cout << i <<' ' ;
			b=false ;
			j=k ;
			break  ;
		}
	}

	for (  l=i+j; l<= n-y ; l +=j )
			cout << l <<' ' ;

	if (b)
	cout <<"-1" ;
	return 0 ;
}


#include <iostream>
#include<string>
using namespace std ;
int main ()
{

	int k , y, n, i, c;
	bool b = true ;

	cin >> y >>k >>n ;

	for (  i =1; i<= n/k ; i ++ )
	{
		if (i ==1 ) b = false ;
		c= i*k -y ;
		if (c >0 )
			cout << c <<' ';
	}

	if (b)
	cout <<"-1" ;
	return 0 ;
}


#include <iostream>
#include<string>
using namespace std ;
int main ()
{
	int k , y, n, i;
	bool b = true ;

	cin >> y >>k >>n ;

	for (  i =1; i< n-y ; i ++ )
	{
		if ((i+y) %k == 0 )
		{
			cout << i <<' ' ;
			b=false ;
		}
	}

	if (b)
	cout <<"-1" ;

	return 0 ;
}


#include <iostream>
#include<string>
using namespace std ;
int main ()
{
	int k , y, n, i, j=1;
	bool b = true , b1=true;

	cin >> y >>k >>n ;

	for (  i =1; i<= n-y ; i +=j )
	{
		if ((i+y) %k == 0 )
		{
			cout << i <<' ' ;
			b=false ;
		}
		if (!b & b1)
		{
		    j =k ;
			b1= false;
		}
	}

	if (b)
	cout <<"-1" ;

	return 0 ;
}


#include <iostream>
#include <cmath>
#include <utility>
#include <vector>

using namespace std;

int mas[1000001];

int main()
{   int y,k,n = 0;
 //ios_base::sync_with_stdio(false); cin.tie(NULL);
cin>>y>>k>>n;
vector<int> answer(0);
for(int i = 1; i+y<=n; i++)
{
    if((i+y)%k==0)
    {
        answer.push_back(i);
    }
}

if(answer.size()==0)
    cout<<-1;
else
{
    for(int i = 0; i<answer.size(); i++)
    {
        cout<<answer[i]<<" ";
    }
}

return 0;
}


#include <iostream>
#include <cmath>
#include <utility>
#include <vector>

using namespace std;

int mas[1000001];

int main()
{   int y,k,n = 0;
 //ios_base::sync_with_stdio(false); cin.tie(NULL);
cin>>y>>k>>n;
vector<int> answer(0);
int d = 0;
while((y+d)%k!=0)
    d++;
for(int i = d; i+y<=n; i=i+k)
{
    if((i+y)%k==0)
    {
        answer.push_back(i);
    }
}

if(answer.size()==0)
    cout<<-1;
else
{
    for(int i = 0; i<answer.size(); i++)
    {
        cout<<answer[i]<<" ";
    }
}

return 0;
}


#include <iostream>
#include <cmath>
#include <utility>
#include <vector>

using namespace std;

int mas[1000001];

int main()
{   int y,k,n = 0;
 //ios_base::sync_with_stdio(false); cin.tie(NULL);
cin>>y>>k>>n;
vector<int> answer(0);
int d = 1;
while((y+d)%k!=0)
    d++;
for(int i = d; i+y<=n; i=i+k)
{
    if((i+y)%k==0)
    {
        answer.push_back(i);
    }
}

if(answer.size()==0)
    cout<<-1;
else
{
    for(int i = 0; i<answer.size(); i++)
    {
        cout<<answer[i]<<" ";
    }
}

return 0;
}


#include <iostream>
#include <cmath>
#include <utility>
#include <vector>

using namespace std;

int mas[1000001];

int main()
{   int y,k,n = 0;
 //ios_base::sync_with_stdio(false); cin.tie(NULL);
cin>>y>>k>>n;
vector<int> answer(0);
int z = (y)%k;
int d = -z+k;

for(int i = d; i+y<=n; i=i+k)
{
    if((i+y)%k==0)
    {
        answer.push_back(i);
    }
}

if(answer.size()==0)
    cout<<-1;
else
{
    for(int i = 0; i<answer.size(); i++)
    {
        cout<<answer[i]<<" ";
    }
}

return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    int y,k,n;
    cin >> y >> k >> n;
    int temp=(y/k)*k+k;
    if(temp>n)
        cout << -1;
    else
    {
    for(;temp<n;temp+=k)
        cout << temp-y << " ";
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    int y,k,n;
    cin >> y >> k >> n;
    int temp=(y/k)*k+k;
    if(temp>n)
        cout << -1;
    else
    {
    for(;temp<=n;temp+=k)
        cout << temp-y << " ";
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main()
{
    int y,k,n;
    cin >> y >> k >> n;
    int x=2;
    for(;x+y<=n;x++)
    {
    if((x+y)%k==0)
        cout << x << "\n";
    }
    if(x==2) cout << -1 << "\n";
    return 0;
}