program pil_6_41_l(input,output);
label 9999;
var
	c : char;
  len, num : integer;
  result : boolean;
begin
  len := 0;
  num := -1;
	read(c);
  while c<>'.' do begin
  	if (ord(c)>=ord('0'))and(ord(c)<=ord('9')) then
	    if (num=-1) then num := ord(c) - ord('0')
	    else begin
      	result := false;
        goto 9999;
      end;
    len := len + 1;
  	read(c);
  end;
  result := len=num;

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

end.