#include <cstdio>
#include <algorithm>
#include <map>
using namespace std;
map <int,int> ans;
int coin[100010];
int main(){
freopen("in.txt","r",stdin);
int n,p,cnt=0;
scanf("%d %d",&n,&p);
for(int i=0;i<n;i++){
int x;
scanf("%d",&x);
if(x<p){
coin[cnt++]=x;
}
}
sort(coin,coin+cnt);
//lower_bound的返回值为指针
//int righ=lower_bound(coin,coin+n,p)-coin-1;
int righ=cnt-1;
int left=0;
while(left<righ){
if(coin[left]+coin[righ]>p){
righ--;
}else if(coin[left]+coin[righ]<p){
left++;
}else{
ans[coin[left]]=coin[righ];
left++;
righ--;
}
}
if(ans.size()==0){
printf("No Solution\n");
}else{
map <int,int>::iterator it=ans.begin();
printf("%d %d\n",it->first,it->second);
}
return 0;
}