시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
0.1 초 1024 MB 0 0 0 0.000%

문제

Mirek really likes playing with numbers. Together with his friend, Kamil, he plays a following game. At the beginning, there are two non-negative integers – A and B. Let’s say A ≤ B. The players can perform one of two moves in turns:

  • Replace B with B − AK. Number K can be any integer chosen by the player, considering the limitations that K > 0 and B − AK ≥ 0.
  • Replace B with B mod A.

If B ≤ A, similar moves are possible. The player who changes any number into 0, wins. Mirek always starts. He likes this game, but he likes winning much more. Help him determine who will win, if both of them play optimally.

You are given the description of games played by Mirek and Kamil. For every game determine who will win, Mirek or Kamil.

입력

First line contains an integer T (1 ≤ T ≤ 104), the number of games played by boys. In the next T lines, there are descriptions of those games. Every such line contains two integers A, B (1 ≤ A, B ≤ 1018)

출력

Output T lines. The i-th line should contain the name of the player who wins the i-th game, Mirek or Kamil.

예제 입력

4
1 1
12 4
4 6
15 31

예제 출력

Mirek
Mirek
Kamil
Mirek

힌트