300382: CF72I. Goofy Numbers
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
I. Goofy Numberstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output
The non-negative integer a is a divisor of the non-negative integer b if and only if there exists a positive integer c such that a × c = b.
Some numbers are really interesting. Commander Surena defines some interesting properties for non-negative integers:
- An integer is happy if it is divisible by at least one of its digits and not by all of them.
- An integer is happier if it is divisible by all of its digits.
- An integer is upset if it's divisible by none of its digits.
Surena asks you to find out if a given number is happy, happier or upset.
InputInput contains a single non-negative integer n (1 ≤ n ≤ 108).
OutputWrite on a single line the type of the integer: happy, happier or upset. Print the type in lowercase letters.
ExamplesInput99Output
happierInput
29994Output
happyInput
23Output
upsetNote
In the second test 29994 is only divisible by 2.
In the third test 23 is a prime number.