def is_permutation(a: int, b: int) -> bool:
    """Returns boolean if a and b are permutations of each other."""
    s_a, s_b = str(a), str(b)
    if set(s_a) != set(s_b):
        return False
    if len(s_a) != len(s_b):
        return False
    return sorted(list(s_a)) == sorted(list(s_b))