Hausdorff dimension for fractals invariant under multiplicative integers