#include <iostream>
#include <fstream>
#include <cstdio>
#include <iomanip>
#include <sstream>
#include <cstring>
#include <string>
#include <cmath>
#include <stack>
#include <list>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <functional>
#include <limits>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int ui;
typedef pair<int,int> pii;
typedef vector<vector<int> > graph;
const double pi = acos(-1.0);
#define oned(a, x1, x2) { cout << #a << ":"; for(int _i = (x1); _i < (x2); _i++){ cout << " " << a[_i]; } cout << endl; }
#define twod(a, x1, x2, y1, y2) { cout << #a << ":" << endl; for(int _i = (x1); _i < (x2); _i++){ for(int _j = (y1); _j < (y2); _j++){ cout << (_j > y1 ? " " : "") << a[_i][_j]; } cout << endl; } }
#define mp make_pair
#define pb push_back
#define fst first
#define snd second
const int MAXN = 100005;
int n, a[MAXN], p[MAXN], cnt[MAXN];
void solve() {
sort(a,a+n);
int k = 0;
for(int i = 0; i < n; ) {
int j = i;
while(j<n && a[i]==a[j]) {
j++;
}
p[k] = a[i];
cnt[k] = j-i;
k++;
i = j;
}
bool mirko = true;
int l = 0, r = k-1;
while(r-l > 1) {
int d = min(cnt[l]-1,cnt[r]-1);
cnt[l+1] += d;
cnt[l] -= d;
cnt[r-1] += d;
cnt[r] -= d;
if(mirko) {
cnt[l]--;
cnt[l+1]++;
if(cnt[l]==0) {
l++;
}
} else {
cnt[r]--;
cnt[r-1]++;
if(cnt[r]==0) {
r--;
}
}
mirko = !mirko;
}
if(mirko) {
printf("Slavko\n");
} else {
printf("Mirko\n");
}
printf("%d %d\n", p[l], p[r]);
}
int main() {
// freopen("B.in", "r", stdin);
while(scanf("%d", &n)==1) {
for(int i = 0; i < n; i++) {
scanf("%d", a+i);
}
solve();
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8ZnN0cmVhbT4KI2luY2x1ZGUgPGNzdGRpbz4KI2luY2x1ZGUgPGlvbWFua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