program pil_6_41_e(input,output);
label 9999;
var
	c, last : char;
  result : boolean;
begin
	read(c);
  while c<>'.' do begin
		last := c;
    if not(
		       ((ord(c)>=ord('0'))and(ord(c)<=ord('9'))) or
		       ((ord(c)>=ord('a'))and(ord(c)<=ord('f'))) or
           ((ord(c)>=ord('A'))and(ord(c)<=ord('F')))
          )
    then begin
    	result := false;
      goto 9999;
    end;
  	read(c);
  end;
  result := (last='0')or(last='5')or
	          (last='A')or(last='a')or
						(last='F')or(last='f');

9999:
	if result	then WriteLn('true')
	else WriteLn('false');

end.