Under construction

Still being built. Things may change

Prime Power Game

Time limit1sMemory limit512 MB

Summary
Two players alternately choose a prime power p^k that divides some element and divide every element it divides by p^k; the player who cannot move loses, so print the winner.
Level

Hard8 of 10

Topics
Math, Number theory, Game theory, Bit manipulation
Solved
No attempts yet

Problem

Koosaga and CubeLover are playing the prime power game. The game uses a sequence of length NN, A1,A2,…,ANA_1, A_2, \ldots, A_N. The two players take turns.

On each turn, the player chooses an integer pp and an integer kk. Here pp must be prime and kk must be a positive integer. Also, pkp^k must divide at least one of the integers in the sequence. Then, every number in the sequence that is divisible by pkp^k is divided by pkp^k. The player who cannot choose pp and kk loses the game.

Write a program that determines which player wins when both players play optimally. Koosaga takes the first turn.

Input

The first line contains NN (1≤N≤1001 \le N \le 100), the size of the sequence. The second line contains A1,A2,…,ANA_1, A_2, \ldots, A_N (1≤Ai≤1091 \le A_i \le 10^9).

Output

If Koosaga wins, print "koosaga". If CubeLover wins, print "cubelover".

Examples4

  1. Example 1

    Input
    4
    1 1 1 1
    
    Expected output
    cubelover
    
  2. Example 2

    Input
    4
    1 1 17 17
    
    Expected output
    koosaga
    
  3. Example 3

    Input
    4
    1 1 17 289
    
    Expected output
    cubelover
    
  4. Example 4

    Input
    5
    1 2 3 4 5
    
    Expected output
    cubelover