Under construction

Still being built. Things may change

Palace Game

Time limit0.5sMemory limit512 MB

Summary
Given N palaces at coordinates on a 3000x3000 board, players alternately move one palace toward the lower-left (decreasing Manhattan distance) via rook or king moves, and the player unable to move loses.
Level

Medium7 of 10

Topics
Game theory, Math, Implementation
Solved
No attempts yet

Problem

The palace is a chess piece that koosaga invented in Problem 16878. A palace can move both the way a rook moves and the way a king moves. That is, it can move to a square in the same row or column, or to one of the four adjacent squares or the four diagonal squares.

Today, we will play a game with palaces together with cubelover.

N palaces are placed on a 3000×3000 chessboard. Koosaga and cubelover take turns, and each turn goes as follows.

  • Choose one palace on the chessboard and move it once toward the lower left. That is, its "Manhattan distance" from the bottom-left square must decrease.

The player who can no longer move a palace loses the game.

Write a program that determines who wins when both players play optimally. Koosaga moves first, and two or more palaces may occupy the same square at the same time.

The bottom-left square has coordinates (0, 0), and the top-right square has coordinates (2999, 2999).

Input

The first line gives the number of palaces N (1 ≤ N ≤ 300,000). Each of the next N lines gives the coordinates x, y of one palace (0 ≤ x, y < 3000).

Output

Print "koosaga" if koosaga wins the game, and "cubelover" if cubelover wins.

Examples5

  1. Example 1

    Input
    1
    3 2
    
    Expected output
    koosaga
    
  2. Example 2

    Input
    1
    3 3
    
    Expected output
    cubelover
    
  3. Example 3

    Input
    1
    6 6
    
    Expected output
    cubelover
    
  4. Example 4

    Input
    3
    7 4
    3 7
    1 0
    
    Expected output
    cubelover
    
  5. Example 5

    Input
    5
    4 2
    6 9
    7 8
    2 1
    5 5
    
    Expected output
    koosaga