#include <iostream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <bits/stdc++.h>
#include <set>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <map>
#define ll long long
using namespace __gnu_pbds;
using namespace std;
template <class T>
using ordered_set = tree<T , null_type , less<T> , rb_tree_tag , tree_order_statistics_node_update>;
template <class T>
using ordered_set1 = tree<T , null_type , greater<T> , rb_tree_tag , tree_order_statistics_node_update>;
// less<T>/greater<T> = ascending/descending.
// less_equal<>/greater_equal<> for ordered multiset
// ordered_multiset note : s.find(), s.erase() don't work + s.upper_bound() and s.lower_bound() swap jobs;
void fastIO(void) {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
int main() {
    fastIO();
    ll n,sum; cin>>n>>sum;
    vector<ll> v(n+1);
    for (ll i = 1; i<=n; i++){cin>>v[i];}
    ll l,r,flag=0;

    for (l = 1; l<n; l++) {
        r=l+1;
        while (r<=n) {
            if (v[l]+v[r]==sum) {
                flag = 1;
            }
            if (flag){break;}
            r++;
        }
        if (flag){break;}
    }
    if (flag) {
        cout<<l<<' '<<r;
    }
    else {
        cout<<"IMPOSSIBLE";
    }
}