#include<bits/stdc++.h>
using namespace std;
const int maxn=2e5+5;
int n;
long long x,a[maxn];
int main(){
//freopen("tong2so.inp","r",stdin);
//freopen("tong2so.out","w",stdout);
cin >> n >> x;
map<long long,long long>m;
for(int i=1;i<=n;i++){
cin >> a[i];
m[a[i]]=i;
}
sort(a+1,a+n+1);
for(int i=1;i<=n;i++){
if(binary_search(a+1,a+n+1,x-a[i])){
cout << min(m[a[i]],m[x-a[i]]) << " " << max(m[a[i]],m[x-a[i]]);
return 0;
}
}
cout << "IMPOSSIBLE";
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpjb25zdCBpbnQgbWF4bj0yZTUrNTsKCmludCBuOwpsb25nIGxvbmcgeCxhW21heG5dOwoKaW50IG1haW4oKXsKICAgIC8vZnJlb3BlbigidG9uZzJzby5pbnAiLCJyIixzdGRpbik7CiAgICAvL2ZyZW9wZW4oInRvbmcyc28ub3V0IiwidyIsc3Rkb3V0KTsKICAgIGNpbiA+PiBuID4+IHg7CiAgICBtYXA8bG9uZyBsb25nLGxvbmcgbG9uZz5tOwogICAgZm9yKGludCBpPTE7aTw9bjtpKyspewogICAgICAgIGNpbiA+PiBhW2ldOwogICAgICAgIG1bYVtpXV09aTsKICAgIH0KICAgIHNvcnQoYSsxLGErbisxKTsKICAgIGZvcihpbnQgaT0xO2k8PW47aSsrKXsKICAgICAgICBpZihiaW5hcnlfc2VhcmNoKGErMSxhK24rMSx4LWFbaV0pKXsKICAgICAgICAgICAgY291dCA8PCBtaW4obVthW2ldXSxtW3gtYVtpXV0pIDw8ICIgIiA8PCBtYXgobVthW2ldXSxtW3gtYVtpXV0pOwogICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CiAgICB9CiAgICBjb3V0IDw8ICJJTVBPU1NJQkxFIjsKfQ==