Algorithm


A. Petya and Java
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Little Petya has recently started attending a programming club. Naturally he is facing the problem of choosing a programming language. After long considerations he realized that Java is the best choice. The main argument in favor of choosing Java was that it has a very large integer data type, called BigInteger.

But having attended several classes of the club, Petya realized that not all tasks require using the BigInteger type. It turned out that in some tasks it is much easier to use small data types. That's why a question arises: "Which integer type to use if one wants to store a positive integer n?"

Petya knows only 5 integer types:

1) byte occupies 1 byte and allows you to store numbers from  - 128 to 127

2) short occupies 2 bytes and allows you to store numbers from  - 32768 to 32767

3) int occupies 4 bytes and allows you to store numbers from  - 2147483648 to 2147483647

4) long occupies 8 bytes and allows you to store numbers from  - 9223372036854775808 to 9223372036854775807

5) BigInteger can store any integer number, but at that it is not a primitive type, and operations with it are much slower.

For all the types given above the boundary values are included in the value range.

From this list, Petya wants to choose the smallest type that can store a positive integer n. Since BigInteger works much slower, Peter regards it last. Help him.

Input

The first line contains a positive number n. It consists of no more than 100 digits and doesn't contain any leading zeros. The number n can't be represented as an empty string.

Please, do not use %lld specificator to read or write 64-bit integers in C++. It is preffered to use cout (also you may use %I64d).

Output

Print the first type from the list "byteshortintlongBigInteger", that can store the natural number n, in accordance with the data given above.

Examples
input
Copy
127
output
Copy
byte
input
Copy
130
output
Copy
short
input
Copy
123456789101112131415161718192021222324
output
Copy
BigInteger



 

Code Examples

#1 Code Example with C++ Programming

Code - C++ Programming

#include <cstdio>
#include <iostream>
#include <string>


int main(){

    std::string input; getline(std::cin, input);

    if(input[0] != '-' && (input.size() < 3 || (input.size() == 3 && input.compare("127")  <= 0)) ){puts("byte");}
    else if(input[0] == '-' && (input.size() < 4 || (input.size() == 4 && input.compare("-128") <= 0)) ){puts("byte");}

    else if(input[0] != '-' && (input.size() < 5 || (input.size() == 5 && input.compare("32767") <= 0)) ){puts("short");}
    else if(input[0] == '-' && (input.size() < 6 || (input.size() == 6 && input.compare("-32768") <= 0)) ){puts("short");}

    else if(input[0] != '-' && (input.size() < 10 || (input.size() == 10 && input.compare("2147483647") <= 0)) ){puts("int");}
    else if(input[0] == '-' && (input.size() < 11 || (input.size() == 11 && input.compare("-2147483648") <= 0)) ){puts("int");}

    else if(input[0] != '-' && (input.size() < 19 || (input.size() == 19 && input.compare("9223372036854775807") <= 0)) ){puts("long");}
    else if(input[0] == '-' && (input.size() < 20 || (input.size() == 20 && input.compare("-9223372036854775808") <= 0)) ){puts("long");}

    else{puts("BigInteger");}

    return 0;
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
127

Output

x
+
cmd
byte
Advertisements

Demonstration


Codeforces Solution-A. Petya and Java-Solution in C, C++, Java, Python

Previous
Codeforces solution 1080-B-B. Margarite and the best present codeforces solution
Next
CodeChef solution DETSCORE - Determine the Score CodeChef solution C,C+