This page is still under construction.

Parts of this page are still being built. What you see may change.

Mint Choco

Interview

Time limit1sMemory limit1024 MB

Summary
Given a chain of integer multiplications and divisions, decide whether the overall value is an integer or a non-integer rational.
Level

Medium5 of 10

Topics
Math, Number theory, Hash map, Implementation
Solved
No attempts yet

Problem

Sangwon picks his dessert in a very unusual way.

Sangwon writes an arbitrary expression made up only of multiplications and divisions of integers. If the result is an integer, he eats "mint choco"; if the result is a rational number that is not an integer, he eats "toothpaste".

Given the expression Sangwon wrote, determine which dessert he will eat.

Input

The first line gives NN, the number of numbers in the expression. (1≤N≤100 0001 \leq N \leq 100\ 000)

The second line gives the expression. The expression consists of integers and operators (*, /) separated by spaces. Integers and operators alternate, and the expression always starts and ends with an integer. Every integer in the expression is between −100 000-100\ 000 and 100 000100\ 000, inclusive.

Only valid expressions are given, and no case divides by 00.

Output

If the dessert Sangwon picked is "mint choco", print mint chocolate; if it is "toothpaste", print toothpaste.

Examples2

  1. Example 1

    Input
    6
    1 * 2 / 3 / 4 * 5 * 6
    
    Expected output
    mint chocolate
    
  2. Example 2

    Input
    6
    1 * 2 / 3 / 4 / 5 * 6
    
    Expected output
    toothpaste