#include
using namespace std;
int main() {
int n;
cin >> n;
double x;
cin >> x;
double a[n],dxf=-1,dxb=-1,da=-1,dd=-1;
for (int i=0; i cin >> a[i];
if (a[i]==x) {
dxb=i+1;
if (dxf==-1) dxf=i+1;
}
if (a[i]<0 && da==-1) da=i+1;
if (a[i]>0) dd=i+1;
}
cout << da << " " << dd << " " << dxf << " " << dxb;
}