program D; {$APPTYPE CONSOLE} var i,n,k,t,troom:integer; c:array [1..1000000] of int64; begin assign(input,'beautiful.in'); assign(output,'beautiful.out'); reset(input); rewrite(output); readln(n); t:=1; for i:=1 to n do begin read(c[i]); end; for i:=1 to n do begin t:= t*c[i]; end; for i:=1 to n do begin if (t mod sqr(i)<>0) and (i<>1) then write('Beautiful'); end; for i:=1 to 2 do begin if (t mod sqr(i)=0) and (i<>1) then write(i); end; for i:=1 to 2 do begin if (t mod sqr(i)<>0) and (i<>1) then write('Beautiful'); end; close(input); close(output); end.