시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB171635540.146%

문제

상근이와 선영이는 새로운 게임을 만들기로 했다.

게임을 시작하기에 앞서 두 사람은 먼저 좌표 평면에 점 N개를 그린다. 그 다음, 턴을 번갈아가면서 게임을 하며, 상근이가 게임을 먼저 시작한다.

상근이는 점 N개중 하나를 통과하고, 좌표축 중 하나에 평행한 직선을 하나 그린다. 그 다음부터는 각 플레이어는 좌표축에 평행하면서 N개의 점 가운데 상대방이 이전에 그린 직선 위의 점을 지나는 직선을 하나 그린다. 같은 직선을 두 번 그릴 수는 없다. 더 이상 그릴 수 있는 직선이 없는 사람이 게임을 지게 된다.

누가 이기는 전략을 가지고 있는지 구하는 프로그램을 작성하시오.

입력

첫째 줄에 N이 주어진다. (1 ≤ N ≤ 10,000)

다음 N개 줄에는 그린 점의 좌표 X와 Y가 주어진다. (1 ≤ X, Y ≤ 500)

출력

상근이가 이기는 경우에는 'Mirko'를, 선영이가 이기는 경우에는 'Slavko'를 출력한다.

예제 입력 1

3
1 1
1 2
1 3

예제 출력 1

Mirko

예제 입력 2

4
1 1
1 2
2 1
2 2

예제 출력 2

Slavko
W3sicHJvYmxlbV9pZCI6Ijk1MjIiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM5YzFcdWMxMjAgXHVhYzhjXHVjNzg0IiwiZGVzY3JpcHRpb24iOiI8cD5cdWMwYzFcdWFkZmNcdWM3NzRcdWM2NDAgXHVjMTIwXHVjNjAxXHVjNzc0XHViMjk0IFx1YzBjOFx1Yjg1Y1x1YzZiNCBcdWFjOGNcdWM3ODRcdWM3NDQgXHViOWNjXHViNGU0XHVhZTMwXHViODVjIFx1ZDU4OFx1YjJlNC48XC9wPlxyXG5cclxuPHA+XHVhYzhjXHVjNzg0XHVjNzQ0IFx1YzJkY1x1Yzc5MVx1ZDU1OFx1YWUzMFx1YzVkMCBcdWM1NWVcdWMxMWMgXHViNDUwIFx1YzBhY1x1Yjc4Y1x1Yzc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