#t25. 乌龟兔子赛跑问题

乌龟兔子赛跑问题

The Tortoise and the Hare

Problem Description

A tortoise and a hare start a race at the same starting point of a rectangular track at the same moment. The tortoise advances 33 metres per minute and never rests; the hare advances 99 metres per minute, but every 1010 minutes it turns back to check on the tortoise — if it finds that it is currently ahead of the tortoise, it rests by the roadside for 3030 minutes, otherwise it keeps running for the next 1010 minutes. After the race has run for TT minutes, decide who is faster between the tortoise and the hare, and output the result as required.

Input Format

The input gives the total race time TT (in minutes) on one line.

Output Format

Output the result of the race on one line: if the tortoise wins output @_@, if the hare wins output ^_^, and if it is a tie output -_-; followed by a space, then the distance covered by the winner (if it is a tie, either the tortoise's or the hare's distance is acceptable).

Sample Input

242

Sample Output

@_@ 726

Constraints

1≤T≤1061 \le T \le 10^6