from collections import Counter


def related_by_digit_permutation(num_a, num_b):
    """
    Check if two numbers are related by digit permutation.
    """

    return Counter(str(num_a)) == Counter(str(num_b))