//tonynater - COCI 2014-2015
#include <algorithm>
#include <iostream>
#include <vector>
#define sz(x) ((int) x.size())
using namespace std;
typedef long long ll;
const ll INF = ll(1)<<60;
const int MAXN = 100010;
int N, A[MAXN];
vector<int> F, V;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
cin >> N;
for(int i = 0; i < N; i++) {
cin >> A[i];
}
sort(A, A+N);
for(int i = 0; i < N;) {
int b = i, e = i;
while(e < N && A[b] == A[e]) {
++e;
}
F.push_back(e-b);
V.push_back(A[b]);
i = e;
}
int lb, rb;
ll low = 0, high = INF;
while(low < high) {
ll mid = (low+high)/2;
lb = 0;
ll sum = 0, cur = 0;
for(; lb < sz(F)-1; lb++) {
cur += F[lb];
sum += cur;
if(sum == (mid+1)/2) {
++lb;
break;
}else if(sum > (mid+1)/2){
break;
}
}
rb = sz(F)-1;
sum = 0, cur = 0;
for(; rb > 0; rb--) {
cur += F[rb];
sum += cur;
if(sum == mid/2) {
--rb;
break;
}else if(sum > mid/2) {
break;
}
}
if(rb-lb > 1) {
low = mid+1;
}else {
high = mid;
}
}
lb = 0;
ll sum = 0, cur = 0;
for(; lb < sz(F)-1; lb++) {
cur += F[lb];
sum += cur;
if(sum == (low+1)/2) {
++lb;
break;
}else if(sum > (low+1)/2){
break;
}
}
rb = sz(F)-1;
sum = 0, cur = 0;
for(; rb > 0; rb--) {
cur += F[rb];
sum += cur;
if(sum == low/2) {
--rb;
break;
}else if(sum > low/2) {
break;
}
}
if(low%2 == 0) {
cout << "Slavko\n" << V[lb] << ' ' << V[rb] << '\n';
}else {
cout << "Mirko\n" << V[lb] << ' ' << V[rb] << '\n';
}
return 0;
}
Ly90b255bmF0ZXIgLSBDT0NJIDIwMTQtMjAxNQoKI2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgoKI2RlZmluZSBzeih4KSAoKGludCkgeC5zaXplKCkpCgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdHlwZWRlZiBsb25nIGxvbmcgbGw7Cgpjb25zdCBsbCBJTkYgPSBsbCgxKTw8NjA7Cgpjb25zdCBpbnQgTUFYTiA9IDEwMDAxMDsKCmludCBOLCBBW01BWE5dOwoKdmVjdG9yPGludD4gRiwgVjsKCmludCBtYWluKCkgewogICAgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbygwKTsKICAgIGNpbi50aWUoTlVMTCk7CiAgICAKICAgIGNpbiA+PiBOOwogICAgCiAgICBmb3IoaW50IGkgPSAwOyBpIDwgTjsgaSsrKSB7CiAgICAgICAgY2luID4+IEFbaV07CiAgICB9CiAgICAKICAgIHNvcnQoQSwgQStOKTsKICAgIAogICAgZm9yKGludCBpID0gMDsgaSA8IE47KSB7CiAgICAgICAgaW50IGIgPSBpLCBlID0gaTsKICAgICAgICB3aGlsZShlIDwgTiAmJiBBW2JdID09IEFbZV0pIHsKICAgICAgICAgICAgKytlOwogICAgICAgIH0KICAgICAgICBGLnB1c2hfYmFjayhlLWIpOwogICAgICAgIFYucHVzaF9iYWNrKEFbYl0pOwogICAgICAgIGkgPSBlOwogICAgfQogICAgCiAgICBpbnQgbGIsIHJiOwogICAgbGwgbG93ID0gMCwgaGlnaCA9IElORjsKICAgIHdoaWxlKGxvdyA8IGhpZ2gpIHsKICAgICAgICBsbCBtaWQgPSAobG93K2hpZ2gpLzI7CiAgICAgICAgCiAgICAgICAgbGIgPSAwOwogICAgICAgIGxsIHN1bSA9IDAsIGN1ciA9IDA7CiAgICAgICAgZm9yKDsgbGIgPCBzeihGKS0xOyBsYisrKSB7CiAgICAgICAgICAgIGN1ciArPSBGW2xiXTsKICAgICAgICAgICAgc3VtICs9IGN1cjsKICAgICAgICAgICAgaWYoc3VtID09IChtaWQrMSkvMikgewogICAgICAgICAgICAgICAgKytsYjsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9ZWxzZSBpZihzdW0gPiAobWlkKzEpLzIpewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgCiAgICAgICAgcmIgPSBzeihGKS0xOwogICAgICAgIHN1bSA9IDAsIGN1ciA9IDA7CiAgICAgICAgZm9yKDsgcmIgPiAwOyByYi0tKSB7CiAgICAgICAgICAgIGN1ciArPSBGW3JiXTsKICAgICAgICAgICAgc3VtICs9IGN1cjsKICAgICAgICAgICAgaWYoc3VtID09IG1pZC8yKSB7CiAgICAgICAgICAgICAgICAtLXJiOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH1lbHNlIGlmKHN1bSA+IG1pZC8yKSB7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAKICAgICAgICBpZihyYi1sYiA+IDEpIHsKICAgICAgICAgICAgbG93ID0gbWlkKzE7CiAgICAgICAgfWVsc2UgewogICAgICAgICAgICBoaWdoID0gbWlkOwogICAgICAgIH0KICAgIH0KICAgIAogICAgbGIgPSAwOwogICAgbGwgc3VtID0gMCwgY3VyID0gMDsKICAgIGZvcig7IGxiIDwgc3ooRiktMTsgbGIrKykgewogICAgICAgIGN1ciArPSBGW2xiXTsKICAgICAgICBzdW0gKz0gY3VyOwogICAgICAgIGlmKHN1bSA9PSAobG93KzEpLzIpIHsKICAgICAgICAgICAgKytsYjsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfWVsc2UgaWYoc3VtID4gKGxvdysxKS8yKXsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgfQogICAgCiAgICByYiA9IHN6KEYpLTE7CiAgICBzdW0gPSAwLCBjdXIgPSAwOwogICAgZm9yKDsgcmIgPiAwOyByYi0tKSB7CiAgICAgICAgY3VyICs9IEZbcmJdOwogICAgICAgIHN1bSArPSBjdXI7CiAgICAgICAgaWYoc3VtID09IGxvdy8yKSB7CiAgICAgICAgICAgIC0tcmI7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH1lbHNlIGlmKHN1bSA+IGxvdy8yKSB7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgIH0KICAgIAogICAgaWYobG93JTIgPT0gMCkgewogICAgICAgIGNvdXQgPDwgIlNsYXZrb1xuIiA8PCBWW2xiXSA8PCAnICcgPDwgVltyYl0gPDwgJ1xuJzsKICAgIH1lbHNlIHsKICAgICAgICBjb3V0IDw8ICJNaXJrb1xuIiA8PCBWW2xiXSA8PCAnICcgPDwgVltyYl0gPDwgJ1xuJzsKICAgIH0KICAgIAogICAgcmV0dXJuIDA7Cn0=