#include<bits/stdc++.h>
using namespace std;
int main()
{
//freopen("in.txt","r",stdin);
int n,m;cin>>n>>m;
vector<int> ppp;
ppp.resize(n);
for(int i=0;i<n;i++){
cin>>ppp[i];
}
sort(ppp.begin(),ppp.end());
int head=0,rear=n-1;
while(head<rear){
if(ppp[head]+ppp[rear]==m){
cout<<ppp[head]<<' '<<ppp[rear];return 0;
}else if(ppp[head]+ppp[rear]>m){
rear--;
}else if(ppp[head]+ppp[rear]<m){
head++;
}
}
cout<<"No Solution";
return 0;
}