#include <bits/stdc++.h>
using namespace std;
void solve(){
int n; double x;
cin >> n >> x;
double am = 0, duong = 0;
int begin = 0, end = 0;
for (int i = 1; i <=n ; i++ ){
double a;
cin >> a;
if (a < 0) {
if (am == 0) am = a;
}
else duong = a;
if (a == x ) {
if (begin == 0) begin = i;
end = i;
}
}
cout << fixed << setprecision(2) << am << ' ' << duong << endl;
cout << begin << ' ' << end;
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
solve();
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp2b2lkIHNvbHZlKCl7CglpbnQgbjsgZG91YmxlIHg7CgljaW4gPj4gbiA+PiB4OwoJZG91YmxlIGFtID0gMCwgZHVvbmcgPSAwOwoJaW50IGJlZ2luID0gMCwgZW5kID0gMDsKCWZvciAoaW50IGkgPSAxOyBpIDw9biA7IGkrKyApewoJCWRvdWJsZSBhOwoJCWNpbiA+PiBhOwoJCWlmIChhIDwgMCkgewoJCQlpZiAoYW0gPT0gMCkgYW0gPSBhOwoJCX0KCQllbHNlIGR1b25nID0gYTsKCQlpZiAoYSA9PSB4ICkgewoJCQlpZiAoYmVnaW4gPT0gMCkgYmVnaW4gPSBpOwoJCQllbmQgPSBpOwoJCX0KCgl9CgkKCWNvdXQgPDwgZml4ZWQgPDwgc2V0cHJlY2lzaW9uKDIpIDw8IGFtIDw8ICcgJyA8PCBkdW9uZyA8PCBlbmRsOwoJY291dCA8PCBiZWdpbiA8PCAnICcgPDwgZW5kOwp9CmludCBtYWluKCl7Cglpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKDApOwoJY2luLnRpZSgwKTsgICAgY291dC50aWUoMCk7Cglzb2x2ZSgpOwoJcmV0dXJuIDA7Cn0K