#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
struct node
{
int x,y,sum;
node(int x1,int y1,int sum1)
{
x=x1;
y=y1;
sum=sum1;
}
};
struct node2
{
node*x;
int y;
node2(node*x1,int y1)
{
x=x1;
y=y1;
}
};
bool duplicate(vector<int> V)
{
map<int,int> Map2;
for(int i=0;i<V.size();i++)
{
if(Map2.count(V[i]) <= 0)
{
Map2[V[i]]=1;
}
else
{
Map2[V[i]]++;
}
}
return Map2.size() != 4;
}
int main() {
int n,x;
cin>>n>>x;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
vector<node*> V;
for(int i=0;i<n;i++)
{
for(int j=i+1;j<n;j++)
{
V.push_back(new node(i,j,a[i]+a[j]));
}
}
map<int,vector<node*> > Map;
for(int i=0;i<V.size();i++)
{
Map[V[i]->sum].push_back(V[i]);
}
vector<int> ans;
for(int i=0;i<V.size();i++)
{
if((V[i]->sum != (x-V[i]->sum)) && Map.count(x-V[i]->sum) >0)
{
ans.clear();
node*nd = Map[x-V[i]->sum][0];
ans.push_back(V[i]->x);
ans.push_back(V[i]->y);
ans.push_back(nd->x);
ans.push_back(nd->y);
if(!duplicate(ans))
{
break;
}
else
{
ans.clear();
}
}
else if((V[i]->sum == x-V[i]->sum) && Map[x-V[i]->sum].size() >1)
{
ans.clear();
vector<node*> V2 = Map[V[i]->sum];
int flag=0;
for(int j=0;j<V2.size();j++)
{
node*nd = V[i];
node*nd2 = V2[j];
ans.push_back(nd->x);
ans.push_back(nd->y);
ans.push_back(nd2->x);
ans.push_back(nd2->y);
if(!duplicate(ans))
{
flag=1;
break;
}
else
{
ans.clear();
}
}
if(flag ==1)
{
break;
}
}
}
if(!ans.empty())
{
sort(ans.begin(),ans.end());
for(int i=0;i<ans.size();i++)
{
cout<<ans[i]+1<<" ";
}
cout<<endl;
}
else
{
cout<<"IMPOSSIBLE"<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVj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