Binary Division#744

Binary Division

1 second
64 megabytes
Easy (≈1000)

When taking his computer science exam, economics student Ivan Hrivniov encountered a question asking him to determine if a given binary number is divisible by 3, 5, or 15. Please assist Ivan with this task.

Input

The input consists of a single positive integer N, presented in binary form without any leading zeros. The binary number contains no more than 10,000 digits.

Output

If the number is divisible only by 3, print "FIRST". If it is divisible only by 5, print "SECOND". If it is divisible by 15, print "BOTH". If the number is not divisible by any of these, print "NONE". All outputs should be in uppercase and without quotes.

Examples

Example 1

Loading
Loading