#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int a[N];
int n, m;
int main()
{
cin >> n >> m;
for(int i = 0; i < n; i ++)
cin >> a[i];
sort(a, a + n);
int k = 0;
for(int i = 0, j = n - 1; i < n; i ++)
{
while(a[i] + a[j] > m && j > i)
{
j --;
}
if(a[i] + a[j] == m && i != j)
{
cout << a[i] << ' ' << a[j];
k = 1;
break;
}
}
if(k == 0)
cout << "No Solution";
return 0;
}