Do n and n^3 have the same set of digits? Given a number n (0 &lt;= n &lt;= 2642245), check if n and n3 have the same set of digits, and output a truthy or falsey value accordingly.

For example, let's check the number 100.

1003 is 1000000.

The set of digits in 100 is {0, 1}.

The set of digits in 1000000 is {0, 1}.

Therefore, 100 should give a truthy value.

Test cases

0 -&gt; True
1 -&gt; True
10 -&gt; True
107624 -&gt; True
251894 -&gt; True
251895 -&gt; False
102343 -&gt; False


Remember, this is code-golf, so the code with the fewest bytes wins.

OEIS A029795
Python 3, 36 32 bytes
lambda x:{*str(x)}=={*str(x**3)}

I think this only works in Python 3.5 and later.
Four bytes have gone, thanks to Copper.