Suppose you have `n` integers labeled `1` through `n`. A permutation `perm` (1-indexed) is **beautiful** if for every position `i`, either `perm[i]` is divisible by `i` or `i` is divisible by `perm[i]`.
Return the number of beautiful arrangements you can construct.