#include<bits/stdc++.h>
using namespace std;
int main(){
int n,s,x; cin >> n >> s;
map<int,int> m;
vector<int> v(n);
for(int i=1;i<=n;i++) cin >> v[i-1];
for(int i=1;i<=n;i++){
int need = s - v[i-1];
if(m.find(need) != m.end()){
cout << m[need] << " " << i;
return 0;
}
m[v[i-1]] = i;
}
cout << "IMPOSSIBLE";
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCl7CglpbnQgbixzLHg7CWNpbiA+PiBuID4+IHM7CgltYXA8aW50LGludD4gbTsKCXZlY3RvcjxpbnQ+IHYobik7Cglmb3IoaW50IGk9MTtpPD1uO2krKykJY2luID4+IHZbaS0xXTsKCWZvcihpbnQgaT0xO2k8PW47aSsrKXsKCQlpbnQgbmVlZCA9IHMgLSB2W2ktMV07CgkJaWYobS5maW5kKG5lZWQpICE9IG0uZW5kKCkpewoJCQljb3V0IDw8IG1bbmVlZF0gPDwgIiAiIDw8IGk7CgkJCXJldHVybiAwOwoJCX0KCQltW3ZbaS0xXV0gPSBpOwoJfQoJY291dCA8PCAiSU1QT1NTSUJMRSI7CglyZXR1cm4gMDsKfQ==