405149: GYM101807 A Ambidexterity

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Ambidexteritytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

In this task, you are going to determine whether Nai is ambidextrous, i.e. whether he can write equally well with both hands.

You have learned that Nai writes at speed $$$L$$$ characters per minute with his left hand and at speed $$$R$$$ characters per minute with his right hand. If $$$L = R$$$, then obviously Nai writes equally well with both hands; but we allow some leniency.

Given a parameter $$$P$$$, where $$$50 \le P \le 100$$$, Nai is considered ambidextrous if the writing speed of his weaker (slower) hand is at least $$$P\%$$$ that of his dominant (faster) hand, or if $$$L = R$$$, in which case it is hard to tell which hand is dominant. Otherwise, he is either left- or right-handed.

This simple task should not take you more than a few minutes, right?

Input

The first and only line of input consists of three space-separated integers $$$L, R, $$$ and $$$P$$$.

For all test cases, $$$50 \le P \le 100$$$, $$$1 \le L, R \le 100$$$.

Output

If Nai is ambidextrous, output Ambidextrous.

Otherwise, if Nai's dominant hand is his left hand, output Left-handed. Otherwise, output Right-handed.

ExamplesInput
18 37 50
Output
Right-handed
Input
19 37 50
Output
Ambidextrous
Input
100 99 100
Output
Left-handed

加入题单

上一题 下一题 算法标签: