P15661 [ICPC 2025 Jakarta R] Grid Game 2×2

Description

There is a $10^9 \times 10^9$ grid, with rows numbered from $1$ to $10^9$ and columns numbered from $1$ to $10^9$. Denote $(r, c)$ as the cell at row $r$ and column $c$. Initially, exactly $N$ of the cells are black, and the rest are white. The $i$-th black cell is located at $(R_i, C_i)$. Your childhood friends, Kita and Kami, will alternately take turns playing on this grid, with Kita moving first. A turn in the game proceeds as follows. - Pick a black cell $(r, c)$. - Pick a subset $K \subseteq \{1, 2, \ldots, t\}$ where $t$ is the largest integer such that $2^t \leq \min(r, c)$. The set $K$ may be empty. - For each $k \in K$, toggle the colour of $\textbf{all}$ cells $(r-i, c-j)$ satisfying $0 \leq i < 2^k$, $0 \leq j < 2^k$, and $(i, j) \neq (0, 0)$. Toggling a colour means changing black colour to white and vice versa. - Toggle the colour of cell $(r, c)$. Note that the colour of cell $(r, c)$ becomes white after the toggle. A player who is unable to play on their turn, i.e., there are no black cells anymore, loses the game, and the opposing player wins the game. If both players play optimally, determine who will win the game.

Input Format

The first line contains an integer $N$ ($1 \leq N \leq 200\,000$) representing the number of black cells. Each of the next $N$ lines contains two integers $R_i$ and $C_i$ ($1 \leq R_i, C_i \leq 10^9$) representing the location of the $i$-th black cell. All the given black cells are different.

Output Format

Output one line, containing either $\texttt{Kita}$ if the first player will win the game, or $\texttt{Kami}$ otherwise.

Explanation/Hint

$\textit{Explanation of Sample 1:}$ The first player picks the cell $(2, 3)$ and the set $K = \{ 1 \}$ and all the cells become white afterwards. $\textit{Explanation of Sample 2:}$ The first player picks the cell $(8, 8)$ and the set $K$ as an empty set, and the only black cell becomes white afterwards. $\textit{Explanation of Sample 3:}$ The second player can always mirror the last move made by the first player.