uses crt;
const s='Число не представимо в типе ';
t:array[1..5] of string=('Byte','Shortint','Integer','Word','Longint');
var a:longint;
k:byte;
begin
clrscr;
writeln('Введите целое число a=');
readln(a);
writeln('Выберите тип:');
writeln('1-Byte');
writeln('2-Shortint');
writeln('3-Integer');
writeln('4-Word');
writeln('5-Longint');
repeat
readln(k);
until k in [1..5];
case k of
1:if (a>=0)and(a<=255) then write(a)
else write(s,t[k]);
2:if (a>=-128)and(a<=128)then write(a)
else write(s,t[k]);
3:if (a>=-128)and(a<=128)then write(a)
else write(s,t[k]);
4:if (a>=0)and(a<=65535)then write(a)
else write(s,t[k]);
5:write(a);
end;
readln
end.